Code: Select all
echo "This is a number: {$number}";
//or
${number}As I often see them in places where the code works with or without them, I haven't been able to figure out exactly what they are for!
Moderator: General Moderators
Code: Select all
echo "This is a number: {$number}";
//or
${number}Code: Select all
<?php
$arr['somename'] = '100500';
echo "this is somename: {$arr['somename']} .";
?>
Code: Select all
<?php
$string = 'This is array value: '.$array['some'];