Learning PHP. Help Please

Something else for Armagetron? Goody!
Post Reply
SoulOfSet
On Lightcycle Grid
Posts: 30
Joined: Tue Feb 22, 2011 3:54 am
Contact:

Learning PHP. Help Please

Post by SoulOfSet »

I'm just starting to learn php with websites and the like and i thought i would make a script for tron. I'm kinda a noob can anyone tell me if this is how the script should look like if im trying to have the script tell the console to say something when a certain phrase is said?

Code: Select all

<?php
	$ln1="Hi Soul";
	$ln2="Soul";
if (strpos('$ln1', '$ln2') !==FALSE) {
	print ("say SOUL IS A BEAST");
}
?>
Don't dis to hard if thats a fail. I mean i've only been at this for what, like a week + school sooo....
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: Learning PHP. Help Please

Post by Tank Program »

That would be the correct conditional logic I believe... Now you just need everything else.
Image
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Learning PHP. Help Please

Post by AI-team »

Tank Program wrote:Now you just need everything else.
lol!
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
Post Reply