This is written in (you know what language)...
// check the string length
echo " The serial number is " . $NoSiri . " and the length is " . strlen($NoSiri) . " character ";
$rest = substr($NoSiri, 0, 1); // check the first character
echo $rest;
// jika 1st character = 0, buang
if ($rest == '0'){
$NewNoSiri = (ltrim($NoSiri,$rest));
echo " It's now " . strlen($NewNoSiri) . " character ";
echo $NewNoSiri; }
else
{echo "Wrong number";}
This portion of program I used to check on my db if the serial number of cards inserted in the db starts with '0'.
Please feel free to use it if you like it. I begin with simple thing - CEx team
Sunday, March 27, 2011
Monday, March 21, 2011
A tribute to the late princess of Wales
Yes, I'm a big fan of her. Still mourning on her demise. Aku abadikan gambar dia dan anak-anaknya in my profile. The first one - dah besar , dah nak kawin pun.... The second one - dah ada clearance nak fly Apache. Gambar tu aku jumpa masa browse gambar-gambar dalam internet.
It's a postcard picture contributed by Anna Ferris Gardner, hasil kerja beliau boleh dilihat di sini : http://www.postcard-pictures.com/contributors.asp?id=47
It's a postcard picture contributed by Anna Ferris Gardner, hasil kerja beliau boleh dilihat di sini : http://www.postcard-pictures.com/contributors.asp?id=47
Subscribe to:
Comments (Atom)
