Thread: Foreach
View Single Post
Old 03-19-2008, 04:54 AM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default Foreach

Just another method I guess :P
PHP Code:
<?php
error_reporting
(E_ALL);
$_GET = array();

$_GET['a'] = "Hello World!";

if (
$_GET['a'])
{
    
extract($_GET);
    
$t [] = $a;
    foreach(
array_keys($t) As $val)
    {
        echo 
$t[$val];
    }
}
?>
Instead of $key => $val xD

This can be simplified but I was just having fun. :]
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
The Following User Says Thank You to Orc For This Useful Post:
nullbyte (03-19-2008)