Jump to content

PHP and mysqli


random1

Recommended Posts

Hi,

 

I have got some code that uses a 2D array created from a mysqli result set.

 

It outputs the test data correctly.

 

I would like to search the 2d array but I can't work out how to.

 

For example I would like to search by systemsetting_name and set a varible to the value.

 

Current Code:

 

$results = $database->getRecords('select * from system_setting');

 

echo("<br /><br /><strong>System Settings:</strong><br />");

 

// Loop through settings result set and set variables

for ( $counter = 0; $counter <= sizeof($results); $counter += 1) {

$name = $results[$counter]['systemsetting_name'];

$value = $results[$counter]['systemsetting_value'];

echo($name." ".$value);

echo("<br />");

}

Link to comment
https://forums.phpfreaks.com/topic/89490-php-and-mysqli/
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.