|
Posted by Jerry Stuckle on 10/30/37 11:28
garimapuri@gmail.com wrote:
> 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
>
Which database? Do you want to put the array all in one row, or
multiple rows?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|