Hi everyone !
I have following problem:
I run the code below and i want the script to divide $s by 2 and then echo the values.
but the script only takes the digits after the last fullstop. Can anyone help ?
(The script echos 15 as the half of 30)
<?
$s = "10.20.30";
$part = explode(".",$s);
foreach ($part as $var)
$tmp = $var / 2;
echo $tmp;
?>
thanks in advance
al