Simple Variable Question


Posted on 16th Feb 2014 07:03 pm by admin

Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it.
But I have run into a problem I cannot solve.

From what I understand, you can only "echo $variable", if the variable is created above the "echo".
short example
$something = "1999 kawasaki";
Echo $something;
----------

How would I echo or print a variable if it is created below the area where I want to place the "echo $variable"
Short Example
Echo $something;
**all of the page content here**
$something = "1999 kawasaki";


I have searched for hours and cannot find a solution.
Thanks in advance for any help

No comments posted yet

Your Answer:

Login to answer
269 Like 7 Dislike
Previous forums Next forums
Other forums

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

upgrade from 4.7 to ECC 6.0
Hi all,
we are going to do an upgrade from R/3 4.7 to ECC 6.0. I need to know if i can find som

Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash