WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Call by reference and multidimensional arrays.
Categories : Arrays, PHP Update Picture
Jouni Ahto
Date : Apr 26th 1998
Grade : Be the 1st to grade this Code Example
Viewed : 14906
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Jouni Ahto
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

// This code was originaly written by Anton Stckl (tony@cys.de)


<?
function GetDBRows ($result, $data)
{
$rows = pg_NumRows($result);
$fields = pg_NumFields($result);
for ($i = 0; $i < $rows; $i++)
{
for ($k = 0; $k < $fields; $k++)
{
$tmp = pg_result($result, $i, $k);
$data[$i][$k] = "$tmp";
}
}
}

$c = pg_connect("...");
$result = pg_exec($c, "select ...");
GetDBRows($result, &$foo);

while ($array = current($foo))
{
while ($string = current($array))
{
echo $string . "\n";
next($array);
}
next($foo);
}
?>



grab the result of any calculation you submit to the Google Calculator.
Categories : PHP, Arrays, Web Services, Regexps, Math.
Finds the median in an array of numbers - Can be used with a MySql database column read into an array
Categories : PHP, Arrays, Databases, MySQL
dynamic table columns
Categories : PHP, HTML and PHP, Arrays, Databases, MySQL
BBCode Formatting String
Categories : PHP, HTML, Regexps, Arrays
create a grid out of <INPUT TYPE=TEXT> then saving to a database. Uses a 'multi-dimension array', but not really as the array is just one big array with the index of "[$i][$j]". Have a look at the code and you'll see what I mean.
Categories : PHP, MySQL, Arrays, Databases
CSS style switcher
Categories : PHP, CSS, HTML and PHP, Arrays, Sessions
Link Submition - Allow your visitors to submit links to the site.
Categories : PHP, Arrays, Filesystem, Beginner Guides
Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL
Array Insertion
Categories : PHP, PHP Classes, Arrays
array -- Create an array
Categories : PHP, PHP Functions, Arrays
How to get the source of a site into an array.
Categories : Arrays, HTML, PHP
Simple script to passing persistent and growing array between recalls of one page (manipulate little stack).
Categories : Arrays, Global Variables, PHP, HTML and PHP, Variables
How to append arrays - fill an Array with dynamic values.
Categories : Arrays, PHP
PHPDRAW, the php wannabe Photoshop ;-)
Categories : PHP, PHP Classes, GD image library, Arrays
How to load a query result into a PHP Array
Categories : PHP, Databases, Arrays, MySQL