Php > Arrays
Looping through two arrays
Looping through two arrays I had two result sets (names) loaded into arrays, in this case $result_base and $result_compare. I needed to check how similar each name was to every other name. In order to do that, I used a nested while() function like so: while ($base = mysql_fetch_array($result_base)) { mysql_data_seek($result_compare, 0); while ($compare = mysql_fetch_array($result_compare)){ //code do do the comparison } } //I'm sure there are more elegant ways to do this, but this worked for me. ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage