mulaus
11-06-2012, 04:49 AM
Hi im a php newbie
i have this code
<?
$noic = "811009-xx-xxxx";
$ex = explode('-',$noic);
$sp = str_split($ex[0]);
$year = $sp[0].$sp[1];
$month = $sp[2].$sp[3];
$day = $sp[4].$sp[5];
echo $day.'-'.$month.'-'.$year;
?>
it will change noic = 811009-xx-xxxx to date 09-10-81
what if my noic is in this format 811009xxxxxx
how do i do this..
TQ
i have this code
<?
$noic = "811009-xx-xxxx";
$ex = explode('-',$noic);
$sp = str_split($ex[0]);
$year = $sp[0].$sp[1];
$month = $sp[2].$sp[3];
$day = $sp[4].$sp[5];
echo $day.'-'.$month.'-'.$year;
?>
it will change noic = 811009-xx-xxxx to date 09-10-81
what if my noic is in this format 811009xxxxxx
how do i do this..
TQ