Re: [PHP] Hashes in strings
Hi, I would suggest not to use $hash[var1][var2] instead of $hash['var1']['var2'] because afaik php will think u mean two constants ( var1 and var2 ). Just if it doesnt find these constants it will use them as $hash['var1']['var2']. Markus Mirsberger "Dan Hardiker" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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
[PHP] Re: Newbie question about PHP and Oracle
Hi, I think you mean hwo u can get the data into an array well here is an example : $query = "select ..."; $stmt = ociparse( $connectionhandle, $query ); if( ociexecute( $stmt, OCI_DEFAULT ) ){ ocifetchinto( $stmt, $row, OCI_ASSOC+OCI_RETURN_NULLS ); } and now you got 1 resultset in an associative array called $row. take a look at the oci-functions in the manual for the different flags u can set. regards markus mirsberger "Michael Sweeney" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > a VERY newbie question, just how do I get data into a listbox? In mysql it > was pretty easy with mysql_fetch_row, but for oracle I am totally lost. > > > Thanks! > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php