[pmwiki-users] Page Text Variables Array . . .
Patrick R. Michaud
pmichaud at pobox.com
Wed May 9 14:33:52 CDT 2007
On Wed, May 09, 2007 at 09:27:19PM +0200, Dominique Faure wrote:
> On 5/9/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Wed, May 09, 2007 at 12:36:50PM -0400, Ben Wilson wrote:
> >> [...] is it possible to add this function to the core
> >> so that other recipe developers could avail themselves of the
> >> function?
> >>
> >> function PageVarA($pagename,$var,$delm=',') {
> >> return array_map(trim, explode($delm, PageVar($pagename, $var)));
> >> }
> >
> >I'm going to wait on this particular functionality (page variables
> >as arrays) simply because I want to think about the longer-term
> >ramifications a bit. It may also be necessary at some point to
> >be able to deal with CSV strings [...]
>
> so, why not directly targeting "standards" like JSON [1]?
1. Gee, I thought that CSV was a standard. It's at least
common enough to warrant its own RFC! :-) :-) [2, 3]
2. JSON seems a bit of overkill for markup text and page text
variables. I think something simpler is likely to be better
here. And we can always extend to JSON if we need it.
Thanks!
Pm
[1] http://en.wikipedia.org/wiki/JSON
[2] http://tools.ietf.org/html/rfc4180
[3] http://en.wikipedia.org/wiki/Comma-separated_values
More information about the pmwiki-users
mailing list