RE: [PHP] php equiv of perl string "foo @{[function()]} bar"; ?
| From: | John Holmes | Date: | Mon, 16 Sep 2002 19:13:08 +0000 |
| Subject: | RE: [PHP] php equiv of perl string "foo @{[function()]} bar"; ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116560@lists.php.net to get a copy of this message | ||
Nothing like the examples that I'm aware of. I know you can use the
braces for print arrays.
Echo "value is {$value['key']}";
What you'll have to do is break in and out of the string.
Echo "38line" . function() . "5 lines" . function2();
---John Holmes...
> -----Original Message-----
> From: Thoenen, Peter Mr. EPS
> [mailto:Peter.Thoenen@bondsteel2.areur.army.mil]
> Sent: Monday, September 16, 2002 1:45 PM
> To: 'php-general@lists.php.net'
> Subject: [PHP] php equiv of perl string "foo @{[function()]} bar"; ?
>
> Anybody know if php has some type of equiv construct or function like
> interpolating a function in string in perl. eg: print "foo
> @{[localtime()]}
> bar"; OR print "foo ${|($var+6)} bar";
>
> While it doesn't make much sense in the above context ... sometimes
you
> have
> a rather large string block echo "<--50 lines -->" and don't really
want
> to
> stop and do a echo "38lines"; funciton(); echo"5 lines";
function();echo"7
> lines"; etc etc.
>
> Cheers,
>
> -Peter
>
> ##################################
> Peter Thoenen - Systems Programmer
> Commercial Communications
> Camp Bondsteel, Kosovo
> ##################################
>
> "Stumbled Upon"...heh (Score:5, Funny) /.
> by $carab on 23:00 23 August 2002 (#4131637)
>
> "ForensicTec officials said they stumbled upon the military networks
about
> two months ago, while checking on network security for a
private-sector
> client."
>
> Someone new to a Dvorak probably tried to type in "lynx
> http://www.google.com" but instead got "nmap -v -p
> 1-1024 -sS -P0
army.mil
> -T paranoid".
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php