Jump to content

Welcome to Pure Warfare - The #1 Community for Pures

Welcome to Pure Warfare - The #1 Community for Pures, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of Pure Warfare - The #1 Community for Pures by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

Learning PHP


Recommended Posts

Well Ryan was supposed to do this as I did lol :lol:

 

Here are some of the scripts I have wrote. Starting from first to last.

 

<html>	  <head>			<title>Example</title>	  </head>	  <body>		 	<?php echo "Hi, I'm a PHP script!"; ?>  </body></html>

 

<?php 	echo 4 + 5;	$daysayear = 365;	$daysaweek = 7;	$hours = 24;	$minutes = 60;	$seconds = 60;	$age = 15;	echo $daysayear * $hours * $minutes * $seconds; echo " seconds per year"; echo "<br />";	echo $daysaweek * $hours * $minutes; echo " minutes per week"; echo "<br />";	echo $daysayear * $hours * $minutes * $seconds * $age; echo " how many seconds old I am";?>

 

<?php	echo 'this is a simple string';	echo 'Arnold once said "I\'ll be back"';	echo 'You deleted c:\\*.*?';	echo 'You deleted c:\*.*?';	echo 'th\'*\' \'%$@\'+_\\\><\'';?>

 

<?php	$var = 'Tyler';	$Var = 'Is Sexy';	echo "$var $Var";?>

 

<?php	echo strtoupper('abcdefghijklmnopqrstuvwxyz'); echo "<br />";	echo ucwords('batman is hungry'); echo "<br />";	echo round(7.4); echo "<br />";	echo sqrt(9); echo "<br />";	echo strrev('Hello World!'); echo "<br />";	echo strtolower('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); echo "<br />";	$text = '<p>Title of Paragraph<p><!-- Comment --> <a href="#fragment">Other Text</a>';	echo strip_tags($text);	echo "\n";		// Allow <p> and <a>	echo strip_tags($text, '<p><a>');?>

 

<?php	var_dump('5'>7);	var_dump(84 < 90);	var_dump('basketball' != 'basketball');	var_dump('19' !== '19');	var_dump('halo wars' == 'halo wars');	var_dump('28' === 28);	var_dump(20 >= 10);	var_dump(56 <= 56); echo "<br />";		$age = 21;	$drunk = false;	$wearing_shoes = true;	$owner = false;	$wife = true;	$angry = true;	$celebrity = true;	$dealer = true;	if ($age>= 21 && ! $drunk && $wearing_shoes && ! $dealer || $owner || $wife && ! $angry || $celebrity )		{			echo "Welcome to the club!";		}		{			echo "You're not welcome";		}?>

 

There really is no point to any of these scripts besides learning and understand some PHP :lol:

Vim
|Tyler| - #Zulus
8818 person to achieve 99 Mining
ascreborn.png
Tyler.png

Omni was here lOL
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...

I understand what you mean by your last sentence.

When I was learning PHP I asked myself something along the lines of "Why am I learning all of these functions in this language if I do know how to use them all together?"

Eventually it will all click and you'll be able to use them simultaneously and understand everything, hopefully.

That's what happens with most people and they become a much better PHP developer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...