PHP Help
05-18-2010, 08:03 AM,
#1
PHP Help
im sort of new at php so this might sound stupid but, with php, can you have something like

<?php
$words="This is a paragraph";
?>


on one page then

<?php
echo $words;
?>


on another page and link them together somehow?
05-18-2010, 08:24 AM,
#2
RE: PHP Help
Sure.

<?php
include('whatever.php')
?>
Need help with something? Feel free to pop into the IRC!
05-18-2010, 08:26 AM, (This post was last modified: 05-18-2010, 08:30 AM by YTGraphics.)
#3
RE: PHP Help
Thanks!
its not working
05-18-2010, 08:32 AM,
#4
RE: PHP Help
On whatever.php, have:

$words = 'blah blah';

On otherpage.php, have:

include 'whatever.php';

echo $words;
Hi! I'm Zach, and I founded NiftyHost. If you need anything, just PM me! :)
05-18-2010, 08:35 AM, (This post was last modified: 05-18-2010, 08:36 AM by YTGraphics.)
#5
RE: PHP Help
oh! ill try that
Thanks! It Worked :D
05-18-2010, 08:40 AM,
#6
RE: PHP Help
Yeah. PHP processes statements in a linear fashion, so you need to define $words before you can actually use $words.
Hi! I'm Zach, and I founded NiftyHost. If you need anything, just PM me! :)
05-18-2010, 08:50 AM,
#7
RE: PHP Help
(05-18-2010, 08:40 AM)Zack Wrote: Yeah. PHP processes statements in a linear fashion, so you need to define $words before you can actually use $words.

:P
05-18-2010, 08:54 AM,
#8
RE: PHP Help
Sorry, I was busy and didn't have time to explain :P
Need help with something? Feel free to pop into the IRC!
05-18-2010, 12:17 PM,
#9
RE: PHP Help
its ok :) and lol xiofire gave me a more complicated version to use lol
06-19-2010, 11:52 PM,
#10
RE: PHP Help
here some php tutorials http://w3schools.com/php/default.asp


Forum Jump: