Hi, I think this will accomplish what your trying to achieve.
$str = "I can use $hash[vars] in strings"; However, this will not work for multi dimensional arrays... eg: $hash['var']['var2'] = "Elephant"; $str = "I can NOT use $hash[var][var2] in strings"; will output "I can NOT use Array[var2] in strings". For this you have to jump out of the string and use contcatination... eg: $str = "I can use ".$hash[var][var2]." in strings"; will output "I can use Elephant in strings". Hope that helps :) -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software & Systems Engineer First Creative Ltd > Hey there, > > why do these work: > $vars = "vars"; > $ar[0] = "arrays"; > $hash['vars'] = "hashes"; > str = "I can use $vars in strings"; > str = "I can use $ar[0] in string"; > > while this one doesn't: > str = "I can NOT use $hash['vars'] in strings"; > > Kind regards > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php