I'm using CURL to pass an xml string created from the results of a query.
The string is created as follows:
while ($row = mysqli_fetch_assoc($data_to_insert)) {$data[ ] = $row;}
foreach($data as $datapiece)
{
$data = data.'
<field>
<id>'.$datapiece["id"].'</id>
<value>'.$datapiece["value"].'</value>
Why am I getting Array to string conversion notice?
while ($row = mysqli_fetch_assoc($data_to_insert)) {$data[ ] = $row;} ---> $data is array in here
foreach($data as $datapiece)
{
$data = data.' ----> data is a string in here IT SHOULDN'T BE OVERWRITING PREVIOUS VARIABLE, VARIABLE NEEDS TO BE GIVEN A DIFFERNT NAME
<field>
<id>'.$datapiece["id"].'</id>
<value>'.$datapiece["value"].'</value>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments