We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
  • …
  • 6
Who know PhP?
Topic Started: Feb 23 2005, 08:28 PM (2,516 Views)
The Legendary Sam
Feck j00, mate!
[ *  *  * ]
Code:
 
<?php

echo "I do!";

?>
Offline Profile Quote Post Goto Top
 
Dennis
Member
[ *  *  *  *  *  *  * ]
<?php

define('THE_BALROG',"Balrog Knows PHP");

echo THE_BALROG;

?>
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
<?php

$blah[] = array( 'knows ' => 'Seth ', 'fool.' => 'PHP, ');
foreach ( $blah as $lol => $whee) {
echo ($whee . $lol);
}

?>

:rolleyes:
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
<?php

mysql_connect ("localhost", "MyAwsomeUsername", "myverysecurepassword");
mysql_select_db ("people_who_know_php");

$verycoolvariable = mysql_query ("SELECT name FROM people WHERE name = FearKiller");

echo ('$verycoolvariable knows PHP');

?>
Offline Profile Quote Post Goto Top
 
Arkane
...i need inovation... really badly
[ *  *  *  *  * ]
<?php

"i dont know","php"
?>
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
FearKiller
February 23, 2005 09:56 PM
echo ('$verycoolvariable knows PHP');

Caught you :seth: that prints out:

$verycoolvariable knows PHP

Sucker! Variables inside single quotes are non-parsable!

:D
Offline Profile Quote Post Goto Top
 
Arkane
...i need inovation... really badly
[ *  *  *  *  * ]
<?php

:wacko:

?>
Offline Profile Quote Post Goto Top
 
Renee S
Renée S
[ * ]
ArkaneDark
February 23, 2005 10:00 PM
<?php

"i dont know","php"
?>

:rolleyes:
That would be.
Code:
 
<?php

echo "i dont know"."php";
?>

or
Code:
 
<?php

echo "i dont know","php";
?>
Offline Profile Quote Post Goto Top
 
Zach
Member Avatar
Missjayness
[ *  *  *  *  * ]
Quote:
 
<?php

echo "This is as far as my knowledge goes.";

?>


:P
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
Seth
February 23, 2005 10:01 PM
FearKiller
February 23, 2005 09:56 PM
echo ('$verycoolvariable knows PHP');

Caught you :seth: that prints out:

$verycoolvariable knows PHP

Sucker! Variables inside single quotes are non-parsable!

:D

Not to mention that you didn't even pull a value from mysql_fetch_array(). The contents of $verycoolvariable would be something like "Result Identifier #1" :eh:
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
i know a bit about php.
Offline Profile Quote Post Goto Top
 
Cloudfromffvii
Member
[ * ]
Quote:
 
<?php

echo "I Am Good At"."php";
?><?php


:yes:
Offline Profile Quote Post Goto Top
 
Veritech Pilot
Member Avatar
Bunny Boi of IFS
[ *  *  *  *  *  * ]
Code:
 
<?php

echo "i dont know","php";
?>

Would be me, hehehe. I wanna learn though ^-^
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Seth
February 24, 2005 02:09 AM
<?php

$blah[] = array( 'knows ' => 'Seth ', 'fool.' => 'PHP, ');
foreach ( $blah as $lol => $whee) {
echo ($whee . $lol);
}

?>

:rolleyes:

*gasp*
ZOMG! Seth made a mistake! :ph34r:

You set the first index of $blah to an array (with []), meaning looping through $blah wouldn't be looping through the right array ($blah[0] would).
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
Gornakle
February 24, 2005 08:41 AM
Seth
February 24, 2005 02:09 AM
<?php

$blah[] = array( 'knows ' => 'Seth ', 'fool.' => 'PHP, ');
foreach ( $blah as $lol => $whee) {
echo ($whee . $lol);
}

?>

:rolleyes:

*gasp*
ZOMG! Seth made a mistake! :ph34r:

You set the first index of $blah to an array (with []), meaning looping through $blah wouldn't be looping through the right array ($blah[0] would).

Wrong! First argument of the foreach construct is an array, and since PHP is loosely typed, it understands what I mean. In fact, I wouldn't even have to use the square brackets anywhere!

<-- Winnar :P
Offline Profile Quote Post Goto Top
 
0 users reading this topic
Go to Next Page
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1
  • …
  • 6