note 49243 deleted from function.substr-replace by tularis

From: Date: Fri, 21 Jan 2005 07:13:34 +0000
Subject: note 49243 deleted from function.substr-replace by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83718@lists.php.net to get a copy of this message
Note Submitter: nukeroyal at nukeroyaldotcom Reason: useless ---- Hi ,i use substr_replace alot for a situation with a multiple result query and for a nice out put. <?php // dataaccess $getsomevalues=mysql_query("select s.* from ".$prefix."_ecc_interests s inner join ".$prefix."_ecc_interests_lookup l on s.iid=l.iid where l.user_id='$cookie[0]' "); while ($holdingit =mysql_fetchrow($getsomevalues)) { $interestring.="".$holdingit[interests].",&nbsp;"; } // now its like valuea&nbsp;,valueb&nbsp;,valuec&nbsp;, // application logic /* chop of the last space &nbsp and the , and change it for a dot.*/ $intereststring =substr_replace($interestring,'.',-7); // design print $intereststring; ?> will return valuea, valueb, valuec.

« previous php.notes (#83718) next »