nowdoc Questions

7

Solved

I've already found some solutions, but can't know what happened... Example 1: <?php echo <<< EOD test EOD; Example 2: <?php echo <<< 'EOD' test EOD; Output 1,2: PH...
Landan asked 25/5, 2013 at 1:48

4

Solved

As a newbie, I have been advised to preferably use heredoc compared to too many nested codes (see Unexpected T_ELSE in php code). But I can't manage to understand if there is a significant differe...
Marcheshvan asked 22/6, 2012 at 8:55

2

Solved

I'm trying to use sprintf on a heredoc this way. It wont work. Any idea how to solve this? $i = <<<EOD This is your invoice for %1$s %1$s %1$s %1$s EOD; $year = '2013'; $i = sprintf($i,$...
Haun asked 31/10, 2013 at 4:43
1

© 2022 - 2024 — McMap. All rights reserved.