[UPHPU] A couple of questions - Arrays and String problem
Wade Preston Shearer
lists at wadeshearer.com
Tue Sep 6 11:40:05 MDT 2005
> 1- I am working on a PHP web page that will build a table. The data
> for the table is coming from a MySQL database, one of the fields is a
> list of multiple items. I would like each item in the list to be a
> link to click on that would take the user to a different place. Would
> an array(s) be the best solution for this type of problem or would
> something else work better?
That sounds fine to me.
> 2- In conjunction with question number 1, the items in the list are
> input with a "," as a seperator. I have found some functions (i.e.
> strrpos) that will find a particular character or characters in a
> string. However, best I can tell these only work on finding the first
> or the last character in that string not every one. Do I need to
> (attempt to) build my own function that would find all of the "," in a
> string or is there one that would work for this that is already
> included in PHP?
Sounds like you want explode:
http://php.net/explode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2371 bytes
Desc: not available
Url : http://uphpu.org/pipermail/uphpu/attachments/20050906/3d7854fa/smime.bin
More information about the UPHPU
mailing list