RE: [PHP] [php] explode that :) !

From: Date: Mon, 18 Aug 2003 13:02:01 +0000
Subject: RE: [PHP] [php] explode that :) !
Groups: php.general 
Request: Send a blank email to php-general+get-159912@lists.php.net to get a copy of this message
On 17 August 2003 08:34, Tom Rogers wrote: > Hi, > > Sunday, August 17, 2003, 12:58:23 PM, you wrote: > > $P1OC1Q1 = "1¶some text or some comment"; > > > echo "<tr><td>Your score is: </td><td>"; > $score=split($P1OC1Q1,"¶"); echo $score[0]."</td></tr>\n"; > > > Do I have to go through all that to get score[0] ? > > > John > > > if the number is always first and an integer: > > echo "<tr><td>Your score is: > </td><td>".intval($P1OC1Q1)."</td></tr>\n"; Or (int)$P1OC1Q1 Or $P1OC1Q1+0 Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#159912) next »