On 11-12-17 09:42 AM, Eric Butera wrote:
Hi Adam,
Thanks for the reply, noted! I was coming from the angle that I've
had to deal with a lot of code that is 2000 lines of
php/html/javascript inside heredocs, mixed quote escaping, etc. I was
hoping to prevent that from becoming a new thing in th
On Fri, 16 Dec 2011 23:53:46 -0500, Eric Butera wrote:
>To all the people who responded to this thread:
>It is 2011 - please stop writing code like this.
>
>To the OP:
>I'm glad you're asking questions and realizing you're not happy with
>your current abilities and suspect there's a better way. I
On Sat, Dec 17, 2011 at 12:59 AM, Adam Richardson wrote:
> On Fri, Dec 16, 2011 at 11:53 PM, Eric Butera wrote:
>>
>> To all the people who responded to this thread:
>> It is 2011 - please stop writing code like this.
>>
>> To the OP:
>> I'm glad you're asking questions and realizing you're not h
On Fri, Dec 16, 2011 at 11:53 PM, Eric Butera wrote:
> To all the people who responded to this thread:
> It is 2011 - please stop writing code like this.
>
> To the OP:
> I'm glad you're asking questions and realizing you're not happy with
> your current abilities and suspect there's a better way
On Thu, Dec 15, 2011 at 5:46 PM, Ross McKay wrote:
> Jim Lucas wrote:
>
>>I second this example, with one minor change, I would add '{' and '}' around
>>variables.
>>
>>echo <<>> href="/mypage.php/{$page_id}">{$page_name}
>>HTML;
>>
>>This works for $variables, $objects, and variable functions c
Jim Lucas wrote:
>I second this example, with one minor change, I would add '{' and '}' around
>variables.
>
>echo << href="/mypage.php/{$page_id}">{$page_name}
>HTML;
>
>This works for $variables, $objects, and variable functions calls. But doesn't
>work if you try to call functions directly (
On 12/14/2011 11:50 PM, Ross McKay wrote:
> On Wed, 14 Dec 2011 07:59:46 -0500, Rick Dwyer wrote:
>
>> Can someone tell me which of the following is preferred and why?
>>
>> echo "$page_name";
>>
>> echo "".$page_name."";
>> [...]
>
> Just to throw in yet another possibility:
>
> echo << h
Another nice way would be sprintf. So your string really is just a string
and nothing more.
I don't know how it would affect performance, but just for the eye I find
it much simpler.
echo sprintf("%s", $page_id, $page_name);
2011/12/15 Robert Cummings
> On 11-12-15 02:50 AM, Ross McKay wrote:
>
On 11-12-15 02:50 AM, Ross McKay wrote:
On Wed, 14 Dec 2011 07:59:46 -0500, Rick Dwyer wrote:
Can someone tell me which of the following is preferred and why?
echo "$page_name";
echo "".$page_name."";
[...]
Just to throw in yet another possibility:
echo<<$page_name
HTML;
I love HEREDO
On Wed, 14 Dec 2011 07:59:46 -0500, Rick Dwyer wrote:
>Can someone tell me which of the following is preferred and why?
>
> echo "$page_name";
>
> echo "".$page_name."";
>[...]
Just to throw in yet another possibility:
echo <<$page_name
HTML;
I love HEREDOC for slabs of HTML, sometimes SQL, e
On 14/12/11 16:48, Al wrote:
On 12/14/2011 7:59 AM, Rick Dwyer wrote:
Hello all.
Can someone tell me which of the following is preferred and why?
echo "$page_name";
echo "".$page_name."";
When I come across the above code in line 1, I have been changing it
to what you
see in line 2 for no
On 12/14/2011 7:59 AM, Rick Dwyer wrote:
Hello all.
Can someone tell me which of the following is preferred and why?
echo "$page_name";
echo "".$page_name."";
When I come across the above code in line 1, I have been changing it to what you
see in line 2 for no other reason than it delineate
12 matches
Mail list logo