On Sat, 1 Nov 2003 11:25:09 -0600, you wrote:

>I feel really stupid posting this but I can't seem to find the correct
>syntax in the language guide. I have a string which has been progressively
>built during a FOREACH loop through an array (a SELECT statement in which
>the WHERE part is built with ORs from the array of entries). The final
>query winds up with an extra "OR" at the end. I need to simply delete
>characters (STRLEN($string) - 3) through STRLEN($string). What's the proper
>syntax?

Slightly more sensible approach:

<?
        $a = array ('1', '2', '3', '4', '5');
        $a = implode (' OR ', $a);
        echo ($a);
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to