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: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to