FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » using same variable twice on same page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: using same variable twice on same page [message #171223 is a reply to message #171215] Wed, 29 December 2010 17:21 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 12/29/2010 10:57 AM, richard wrote:
> On Wed, 29 Dec 2010 08:21:45 -0500, Jerry Stuckle wrote:
>
>> On 12/29/2010 12:07 AM, richard wrote:
>>> Everything I have looked at so far talks of how to use one variable ONCE!
>>> Nothing I've seen even comes to close as to how to utilize the same
>>> variable in a different location on the same page.
>>>
>>> for instance:
>>> initial value of $year="1960"
>>> <div> <?php echo $year;?></div>
>>> <div> blah blah blah</div>
>>> <div> yada yada yada</div>
>>> Assume here we change $year to be "1961"
>>> <div> <?php if ($year="1961") echo $year; ?></div>
>>>
>>> From what I've tried, no change is made.
>>> Even if I use a second instance of $_GET().
>>>
>>> What is the best way of doing what I want to happen?
>>>
>>> As you know, google is a hodge podge for looking up something with more
>>> than one word in the search bar.
>>
>> Richard, you really need to get a good book on php. Trying to
>> haphazardly search the internet doesn't work well. And while php.net is
>> a good reference, I don't find it to be a good learning tool. Please
>> save yourself a lot of heartache and spend a few dollars for a good book
>> to help you learn.
>>
>> As for your question - you're confusing '=' and '=='. There is a
>> difference.
>
> Jerry, I bought the PHP 5 bible ok? Like most of these damn things, it is
> so filled with gobly gook only a trained technician could understand.
> Several times he spends 10 pages on crap that has no relation to anything
> any person programming needs to know.
>
> And for you captain pukehead, I constantly read through php.net, tizag, and
> a host of others.

Actually, Richard, I've seen that book. It's a pretty decent
programming book. There is nothing in it a programmer shouldn't know.
As for having to be a "trained technician" - I haven't seen anything in
there requiring such expertise. It does, however, require a logical mind
and understanding of some very basic concepts - concepts every
successful programmer must know (like what is a "byte"?).

I'm sorry you think it's such a poor book - but you can't get a whole
lot better.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AND in the if statement
Next Topic: login script using file, not mysql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 19:23:03 GMT 2024

Total time taken to generate the page: 0.04351 seconds