In PHP you can use arrays of arrays. This is a very convenient way to store data for later manipulation. This is an example of an array with 2 web records: $urls = array();
foreach( $urls as $url ){ foreach( $url as $key => $value ){ echo "{$key} => {$value}\n"; } echo "\n"; }
The result will be:
Full => [URL http://www.maxprog.com]Maxprog[/URL] URL => http://www.maxprog.com Text => Maxprog
Full => [URL http://www.apple.com]Apple[/URL] URL => http://www.apple.com Text => Apple
You can try this code here. I have used this approach lately in new Maxprog Knowledge-base system, in order to format parts of the messages depending on their types.
Deploy an AI agent that learns your product, answers customers instantly, and lets one person handle what used to take an entire team. SoftDesk supports both email and chat with ready-to-install widgets.