# Php?

**URL:** https://forum.kirupa.com/t/php/12664
**Category:** Uncategorized
**Created:** [February 3, 2003, 9:22am UTC](https://forum.kirupa.com/t/php/12664 "2003-02-03T09:22:15Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fishtank](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@fishtank](https://forum.kirupa.com/u/fishtank)
#### Post date: [February 3, 2003, 9:22am UTC](https://forum.kirupa.com/t/php/12664/1 "2003-02-03T09:22:15Z")

</div>

does anyone have an url where i can read about text formatting in php?

i only find tutorials about how to do a mailing-form and things like that, but nothing easy like this

thanks in advance

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 3, 2003, 9:25am UTC](https://forum.kirupa.com/t/php/12664/2 "2003-02-03T09:25:51Z")

</div>

echo() displays text. Inside an echo tag you use HTML tags…

```php
echo("<FONT FACE="Verdana" SIZE="1">This is Text</FONT>")

```

I have to go now, I only a quick second to type that up, I hope it was a point in the right direction.

4:30am… tired… sleep :sleep:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 3, 2003, 9:34am UTC](https://forum.kirupa.com/t/php/12664/3 "2003-02-03T09:34:10Z")

</div>

thanks, great help :beam: , cause i know html quite good…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 3, 2003, 10:24am UTC](https://forum.kirupa.com/t/php/12664/4 "2003-02-03T10:24:55Z")

</div>

have you been to [php.net](http://php.net)? They have the language mapped out there and all the functions etc. …and if I remember right, maybe a few tutorials on starting off… but PHP is just html with extra functions available in \<?php ?\> blocks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 12:06pm UTC](https://forum.kirupa.com/t/php/12664/5 "2003-02-07T12:06:00Z")

</div>

err, no it’s not.

PHP is a very powerful full server side scripting language with similarities to javascript and C.

HTML is used primarily for formatting.

PHP has very little in the way of formatting text, as lostinbeta quite rightly said, you use HTML from within PHP. Just remember to escape " with \ or you’ll get an error. For example…

```php
echo("<FONT FACE="Verdana" SIZE="1">This is Text</FONT>")

```

…would not work, however…

```php
echo("<FONT FACE=\"Verdana\" SIZE=\"1\">This is Text</FONT>");

```

…would.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 1:07pm UTC](https://forum.kirupa.com/t/php/12664/6 "2003-02-07T13:07:27Z")

</div>

> \*Originally posted by dotbob \*  
> **err, no it’s not.**

err, yes it is. You can have a PHP page with only html and no php. You can have a php page with HTML and php. And you can have a php page which is just php.

For anyone not too familiar with php, its a good way to think of php as being just html with other special scripting attatched to it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 1:19pm UTC](https://forum.kirupa.com/t/php/12664/7 "2003-02-07T13:19:57Z")

</div>

> PHP is just html with extra functions available in blocks

err, no it’s not.

> You can have a PHP page with only html and no php. You can have a php page with HTML and php. And you can have a php page which is just php.

What’s the point of giving a php extension to a straight forward HTML page? This is pointless and is actually counter productive as the page will be sent via the PHP parser on every request.

Yes, you can include php WITHIN an HTML file but this does not make PHP similar to HTML. PHP is server side which ultimately means that all code written in PHP is parsed on the server BEFORE being output to the client.

HTML is not parsed by the server. HTML is parsed by the client browser. HTML to give a basic analogy is the glue that holds page content together, PHP is not. PHP (to give another analogy) is the brain that works out the code before sending the results to the client.

Conclusion, PHP cannot in any case be compared to HTML.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 5:57pm UTC](https://forum.kirupa.com/t/php/12664/8 "2003-02-07T17:57:38Z")

</div>

dotbob: I am not going to get into a PHP argument as I don’t know too too much on the subject. I don’t want to get myself in a corner, but also… I don’t believe you need to escape a character. Although my first code was indeed wrong (thanks for noticing) I believe you can also use…

```php
echo("<FONT FACE='Verdana' SIZE='1'>This is Text</FONT>")

```

Using Single Quotes for any quotation marks inside the main Double Quotes of the echo.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 6:15pm UTC](https://forum.kirupa.com/t/php/12664/9 "2003-02-07T18:15:55Z")

</div>

yes. you also don’t need the parenthesis around the entire thing.

```php

echo "whatever";

```

also works. and you can use print as well…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 7, 2003, 6:30pm UTC](https://forum.kirupa.com/t/php/12664/10 "2003-02-07T18:30:33Z")

</div>

Hmm, I didn’t know about no parenthesis. Thanks for that tip.

I knew about print.
