You are here: Re: what does thsi line do « All PHP « IT news, forums, messages
Re: what does thsi line do

Posted by chris on 09/30/05 21:16

I don't feel belittled in any way - I have read a few books (looking
tattered now as I have used them well) and remember seeing something like
that but when I went back to the books I couldn't work out where to look, I
had a feeling what it did but wasn't sure, I spend hours reading through
this newsgroup and others and really gain a lot of information from them.

I have only been using PHP for about 12 months but am getting better all
the time

thankyou everyone for the assistance


"Shawn Wilson" <firstinitial_lastname@dvigroup.net> wrote in message
news:AIG_e.151673$Fp4.101180@fe09.news.easynews.com...
> "Oli Filth" <catch@olifilth.co.uk> wrote in message
> news:BlF_e.2714$9l4.2646@newsfe4-win.ntli.net...
>> Evert said the following on 28/09/2005 23:14:
>>> chris wrote:
>>>
>>>> I was looking through some PHP code and saw the below line of code and
>>>> was wondering what it did -
>>>>
>>>> $w = ($tmp[0]>$maxw) ? $maxw : $tmp[0];
>>>>
>>>> can someone explain what it would do ??
>>>>
>>>>
>>>
>>> if ($tmp[0]>$maxw) {
>>> $w = $maxw;
>>> } else {
>>> $w = $tmp[0];
>>> }
>>>
>>> RTFM?
>>>
>>
>> Not easy to RTFM if you don't know what it's called...
>>
>
> Well, in your defense it IS pretty hard to find that on say php.net if you
> don't know what it's called.
>
> However... besides the online manual, most any paper book about PHP starts
> out with valid syntax rules and shorthand ways of writing code.
>
> A little nicer way of putting RTFM is: You would do yourself some good by
> getting a basic intro to PHP book and at least reading through the first
> couple chapters on syntax and concepts. You would have come across that
> syntax very quickly in most any PHP book and not needed to ask that
> question here for someone to then belittle you.
>
> Don't get me wrong, I myself am quite guilty of this at times and I don't
> want to sit here as a finger pointer. Sometimes, I just want to write
> something and I know that someone out there knows the answer and I don't
> want to read a 300 page book for this one tidbit of info. But, and it's a
> pretty big BUT, there are a LOT of things one can learn by reading at
> least the first couple chapters of a PHP book.
>
> Please know that I really am just trying to pass on a helpful humble
> suggestion to a fellow beginner, not belittle you. Like I said, I'm just
> as guilty at times, but recently I have read a couple PHP books and it has
> cleared up some things that I was unsure of and wouldn't have known where
> to look up otherwise (that particular syntax being one of them).
>
> Your basic O'Reilly 'Programming PHP' is a good place to start.
> ISBN: 1-56592-610-2
>
> Also, 'A Programmer's Introduction to PHP 4.0' by W.J.Gilmore was a big
> help for me.
> ISBN: 1-893115-85-2
>
> Both are for sale on amazon.com for around $30 new or around $10 used.
>
>
> Good luck.
>
> --
> Shawn Wilson
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация