Came across quite a thing today. Spoke to many developers and none of them seemed to know this.
We all know that when you append with an echo you use a full stop in PHP syntax.
echo "123"."456"; Output: 123456
Most of us also knows that echo is a function so ...
echo("789"."456"); Output: 789456
But what I found is that the echo function can append values by using a comma as well...
echo '333','555'; Output: 333555
This might be old new to some, but to me and quite a few developers I know this is something we've never used before. That in itself probably proves that it might not be used by most ... well ... ever. Although that doesn't mean it's not useful to know.
So for someone that for some reason needs to append strings with a comma... here you go.
By PHPin24 @ 2010-03-17 15:19:47
|