Re: Seperate strings in PHP

From: Date: Tue, 02 Jan 2001 21:14:10 +0000
Subject: Re: Seperate strings in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32355@lists.php.net to get a copy of this message
Thanks Philip and thanks Matt. I will give that a go. It looks easier enough to implement. Chris ""Sefton"" <c.sefton@xtra.co.nz> wrote in message news:92tak0$v9p$1@toye.p.sourceforge.net... : Hello Everybody, : : Happy New Year !!! : : I have a question that to the skilled is probably very basic. : : Within a mysql database I have a field that holds the following type of : information... : : ac,pw,ps,rc,cd,aw,rs,4wd,abs etc : : It is the features of a car, and the field name is "specs" (Eg ac = air : conditioning, pw = power steer etc) : I don't want an indivual field for all the different features, but I want to : be able to break up the above string and place an image in my page for that : abreviation. I have the rest sorted out the vehicle make model etc I just : need to display these. I already have the images (eg: ac.gif) : Different vehicles will have different numbers of specs. Some might only : have ac,pw,ps. : : Example : I would like the above string to appear something like... : echo "<img src=\"images/$myrow[10].gif\">"; : : I am not sure how to continue it. Let alone split the string. I assume : converting the string to an array would work, but I am not sure how. Is : there an opposite to the implode command where I could specify the "," as a : break? : : Any help would be really great. : : Thanks, : : Chris : : : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net : For additional commands, e-mail: php-general-help@lists.php.net : To contact the list administrators, e-mail: php-list-admin@lists.php.net :

« previous php.general (#32355) next »