Jump to content

Recommended Posts

My apologies. Yes, $mainarr['br']['sumconditions'] is an array and below is the $mainarr array

 

$mainarr = array("boundvalues"=>array(),
	  "br"=>array("sumconditions"=>array(),
                                  "resultconditions"=>array()),
	  "pd"=>array("sumconditions"=>array(),"resultconditions"=>array()));

running this code gives no output (as the array is empty) but there is no error message.

<?php
error_reporting(E_ALL);

$mainarr = array(
            "boundvalues" => array(),
            "br" => array(
                "sumconditions" => array(),
                "resultconditions" => array()
                ),
            "pd" => array(
                "sumconditions" => array(),
                "resultconditions" => array()
                )
            );

echo implode(" AND ", $mainarr['br']['sumconditions']);            
?>

Thanks Barand. I have figured out whats wrong, but I made the mistake of assuming multidimensional sub-arrays dont implode....  ??? Sorry.

 

Somewhere in my script I assigned a string to $mainarr['br']['sumconditions'] as opposed to assigning the string to $mainarr['br']['sumconditions'][], so I was in effect no longer imploding an array.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.