|
Posted by garimapuri on 10/31/85 11:28
hi
ihad an array in php and iwant to insert its value in database
the coding is:
<?php
$nv_pairs = explode('&',$query_string);
$array[50];
list ($name, $value) = explode ('=',$nv_pairs);
$i = 0;
foreach($nv_pairs as $array[$i]) {
$array[$i]=
preg_replace('/\%0d%0a+/',"<br>
;
;
;
;
;
; ",$array[$i]);
$array[$i]= urldecode ($array[$i]);
$array[$i]= preg_replace('/\d*\=/', " ",$array[$i]);
$array[$i]= urldecode ($array[$i]);
$i++;
}
ksort($array);
while(list($key,$value)=each($array)) {
if (preg_match("/\d+/",$value)) {
echo "<br>
<b>$value</b>";
}
else {
echo " <b>$value</b>";
}
}
?>
now how can $value be put in database or the ksort value of
array
Navigation:
[Reply to this message]
|