Re: If() action within print()..?

From: Garp (garp7_at_no7.blueyonder.co.uk)
Date: 04/04/04


Date: Sun, 04 Apr 2004 17:15:21 GMT


"Ian.H" <ian@WINDOZEdigiserv.net> wrote in message
news:pan.2004.04.04.13.45.38.422000@bubbleboy.digiserv.net...
> On Sun, 04 Apr 2004 14:34:13 +0100, mark wrote:
>
> > "Ian.H" <ian@WINDOZEdigiserv.net> wrote in message
> > news:pan.2004.04.04.13.23.42.250000@bubbleboy.digiserv.net...
> >> On Sun, 04 Apr 2004 14:05:42 +0100, mark wrote:
> >
> >> No.. you want ot be spoon fed. There's a difference.
> >
> > Don't assume I didn't look for the asnwer before I posted. I did, one of
the
> > problems is half the time I don't know which terms to search for "php
within
> > print " php within echo" print contains if" etc etc....see i'm not
familiar
> > with it, hence it makes it alot harder for someone like me to find an
> > answer, a NINJA like you could just find it straight away. I just want
to be
> > able to do something (as fast as possible). I'm never going to master
PHP,
> > nor do I want to. From my point of view, I posted a simple question, one
> > that I assume many people on this forums know the answer to, and could
tell
> > me the answer in 1% of the time it would take me to find it. Instead I
find
> > myself drawn into this because I've some how offended you because I
haven't
> > read the manual from start to finish.
>
>
> foreach ($apples as $foo => $bar) {
> if (strncmp($myvar, $foo, strlen($myvar)) &&
> (strlen($myvar) > 1) && (strlen($foo) > 1)
> ) {
> echo 'class1;
> } else {
> echo 'class2';
> }
> }
>
>
> DO NOT!!!! ask me to explain this to you... you obviously know already..
> you spent 30 mins reading ;)
>
>
> >> Granted the manual can be a little confusing to a newcomer.. but once
you
> >> know what to search for, it is _the_ best resource (just trust me on
this
> >> one).
> >
> > exactly, seeing as though I don't know what to search for the manual is
no
> > help at all. See my point? .....
>
>
> Well 'if' and 'print' may be good starts... no?
>
>
> >> I'm most definietly not saying you're not allowed to use it.. I _WANT_
you
> >> to use it!
> >
> > well, gimme a break. At least tell me what to seach for? or should I be
> > expected to know this already?
>
>
> No one is expected to know anything.. but you're just not going about it
> in the right way. 30 mins _DOES NOT_ constitute research!
>
> There's a million and 1 examples of PHP code on the net and an if / print
> statement has to be one of the most common combinations you're likely to
> find.. yet you seem to be able to miss _ALL_ of them and ask us to code
> for you.
>
> As one of my old bosses once said to me:
>
>
> Unfortunately, common sense isn't all that common.
>
>
>
> Regards,
>
> Ian
>
> --
> Ian.H
> digiServ Network
> London, UK
> http://digiserv.net/
>

Popcorn, anyone? <crunch>

Garp



Relevant Pages

  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: problem with include.
    ... function inside the IF block that was icluded in common. ... posts automatically by running PHP script. ... echo "Updating existing topic...\n"; ...
    (comp.lang.php)
  • Re: Possible to search ALL except filetype?
    ... Or I can narrow it down alittle bit or just put in the common .exts. ... I dump alot of images onto DVDs. ... that aren't the common picture types. ... Remove the word "echo" in the last line to activate the batch file. ...
    (microsoft.public.windowsxp.general)
  • Re: How to return user name in a script even if run by SUDO?
    ... common@common-laptop:~$ sudo echo $ ... Kapil Singh Kushwah ... _BEFORE_ executing sudo. ...
    (Ubuntu)