Can someone please provide me with a user-defined version of this PHP4 function? My web-host is not running PHP4 and therefore I cannot use it but need to and do not know a way around it. Thanks

Please e-mail it to me because i barely ever check these boards. Thanks

roblesrolo@earthlink.net

    function unshift(&$array, &$elements) {
    $temp = array();
    for ($i = 0; $i <= count($elements); $i++) {
    $temp[] = $elements[$i];
    }
    for ($i = 0; $i <= count($array); $i++) {
    $temp[] = $array[$i];
    }

    $array = $temp;
    }

    That should do it, but it's not tested.

      Awesome it worked , now I'll ask for another, array_splice ?? I'm trying to get this discussion board to work on my site but a lot of the functions are for PHP4 and i'm not that experienced in PHP to define them myself ... if you can do this one too I'd appreciate it, thanks!

        Write a Reply...