note 63110 added to function.explode

From: Date: Mon, 13 Mar 2006 18:20:38 +0000
Subject: note 63110 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-105730@lists.php.net to get a copy of this message
If you want to split a price (float) into pounds and pence. or dollors and cents etc etc. $price = "6.20"; $split = explode(".", $price); $pound = $split[0]; // piece1 $pence = $split[1]; // piece2 echo "&pound $pound . $pence\n"; ---- Server IP: 84.18.202.180 Probable Submitter: 82.3.32.71 (proxied: 81.96.251.209) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- http://master.php.net/note/edit/63110 Del: integrated -- http://master.php.net/note/delete/63110/integrated Del: useless -- http://master.php.net/note/delete/63110/useless Del: bad code -- http://master.php.net/note/delete/63110/bad+code Del: spam -- http://master.php.net/note/delete/63110/spam Del: non-english -- http://master.php.net/note/delete/63110/non-english Del: in docs -- http://master.php.net/note/delete/63110/in+docs Del: other reasons-- http://master.php.net/note/delete/63110 Reject -- http://master.php.net/note/reject/63110 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105730) next »