I have some code which takes field from a database and puts them in an array, split by a | character.
I use this data in one long string to search for data in a simple search engine.
To display the results I use the following code to extract the code and put on the screen:
This all works fine (but if you have better way let me know!) What I need to do now is extract the second field, third field, etc.
How can I adapt code to pick which entry I need.....
Code:
$files[$i] = odbc_result($odbc_rs,'ClientCode') . " | " . odbc_result($odbc_rs,'ReportName');
I use this data in one long string to search for data in a simple search engine.
To display the results I use the following code to extract the code and put on the screen:
Code:
substr($value,0,strpos($value," | "))
This all works fine (but if you have better way let me know!) What I need to do now is extract the second field, third field, etc.
How can I adapt code to pick which entry I need.....