Jump to content

Stiil a PHP Newbi


Mr_J

Recommended Posts

Hi all

I’m new to PHP. I got myself a book, SAMS TEACH YOURSELF PHP IN 10 MINUTES.

a Very simple project just to learn: I made a page in php to display the time and date. To go 1 step further, I added some HTML between the codes. When the page is loaded, everything is there except it made 2 extra lines witch I gave no command to do so...  ???

This is my code... It is the bottom part from <HTML> as I’m still fooling around with bad code, " vs ', stop statements and comments etc.

 

<?php        /*

The time is

// lesson 1.1

echo date('H|i|s');?>

and the date is

<?php echo date('j F Y');?>

<?php /* die bg wys die tyd en datum sonder

enige spasies...

?>

<?php

// lesson 1.2

echo "The Time Is ";

echo date('H:i:s');

echo " The Date Is ";

echo date ('j F Y');

// Hierdie het `n spasie tussen die tyd en text van die datum gemaak...

            */ ?>

 

<?php

// lesson 1.3 BADLY Formatted script ?>

 

<?php /*echo "The time is "; echo date('H:i:s'); echo

" and the date is "

; echo date(

'j F Y'

);    // New line in browser: [ \n ]  nog `n ignore statement: [ # ]

*/?>

 

<?php  # lesson 1.4 is om "comments" in jou script te gebruik...

/* time.php [naam van file]

tussen die volgende sal als ge-ignore word deur php /* en */

?>

<html>

<title>PHP in 10 Minutes</title>

<body>

<p><h2><li>Les </h2><h1>1</h1> <h2>gaan oor ECHO "</h2></li></p>

<?php

echo "The time is ";

echo date("H:i:s"); //Hours, minutes, seconds

 

echo " The date is ";

echo date("j F Y"); //Dag naam, maand naam en jaar * let op die spasie voor en na " in die text

?>

<p><h2><strong>Einde van LESSON 1!</strong></h2></p>

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/116957-stiil-a-php-newbi/
Share on other sites

save the css from this page into a file called reset.css and include it in your html page

http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

 

-- dutch ---------------

als je wil kan ik je verder helpen in het nederlands als dat wat makkelijker is voor je :)

Link to comment
https://forums.phpfreaks.com/topic/116957-stiil-a-php-newbi/#findComment-601461
Share on other sites

save the css from this page into a file called reset.css and include it in your html page

http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

 

-- dutch ---------------

als je wil kan ik je verder helpen in het nederlands als dat wat makkelijker is voor je :)

Hoe kan ek jou kontak?

Link to comment
https://forums.phpfreaks.com/topic/116957-stiil-a-php-newbi/#findComment-601478
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.