Jump to content

trim()


bob_the _builder

Recommended Posts

Yea the next step where the array data is used is below.. But I cant be sure where to use trim on $array data

foreach($array as $eacharray) 
{         
    /* Check if product code in each line is in the array of $productcodesarray pulled from the database */ 
    if(in_array($eacharray[0],$productcodesarray)) { 

        /* The product code was found, update the record */ 
        $code = trim($eacharray[0]); 
        $description = trim($eacharray[1]);

Link to comment
https://forums.phpfreaks.com/topic/268448-trim/#findComment-1378481
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.