Okay im new to PHP and i just need to know how to;
Center somthing
Put somthing on next line (Like <br>)
Differant font and size etc..
so style rly
Printable View
Okay im new to PHP and i just need to know how to;
Center somthing
Put somthing on next line (Like <br>)
Differant font and size etc..
so style rly
Erm.
I presume you mean in an echo so:
CBA writing more. Dunno if last one is right as I always use CSS for these things.Code:<?php
echo "<br/>"; IS NEW LINE
echo "<center></center>"; IS CENTER
echo "<font family=\"verdana\"></font>"; WOULD SET FAMILY.
PHP is not an alternative to HTML :s
PHP is a server-side language.
Yes tom. But im guessing he's asking for inner script etc.
Erm.. php is a server side language which is run by the server to output html depending on the script you write. HTML is a mark-up language which is interpreted.
Therefore php can dynamically change what is in the file and HTML displays this.
ooh, let's make it really complicated!
PHP Code:<?php
function center($text){
echo "<center>".$text."</center>";
}
function break(){
echo "<br />";
}
function font($text,$font){
echo "<font family='".$font."'>".$text."</font>";
}
function size($text,$size){
echo "<font size='".$size."'>".$text."</font>";
}
center("Centered Text");
break();
font("Verdana Text","verdana");
break();
size("Big Text",32);
break();
?>
Lets make it more complicated, as that wasn't complicated, probably more complicated than you can understand!
PHP Code:<?php
class oh
{
function yes($string)
{
$string = ucfirst(strtolower($string));
echo("$string yes!<br />");
}
function why($string)
{
$string = ucfirst(strtolower($string));
echo("$string! but why?<br />");
}
}
$lul = new oh;
$lul->why("Rofl.");
$lul->yes("Lol");
?>
lol at how many people will be confused by that ;)
Lets make it more complicated
PHP Code:<?php
class oh
{
function yes($string)
{
eval(base64_decode('JHN0cmluZyA9IHVjZmlyc3Qoc3RydG9sb3dlcigkc3RyaW5nKSk7DQplY2hvKFwiJHN0cmluZyB5ZXMhPGJyIC8+XCIpOw=='));
}
function why($string)
{
eval(base64_decode('JHN0cmluZyA9IHVjZmlyc3Qoc3RydG9sb3dlcigkc3RyaW5nKSk7DQplY2hvKFwiJHN0cmluZyEgYnV0IHdoeT88YnIgLz5cIik7'));
}
}
$lul = new oh;
$lul->why("Rofl.");
$lul->yes("Lol");
?>
Let's make it more complicated:
PHP Code:<?PHP
echo
?>
Still hardly complicated. (Your code).Quote:
Lets make it more complicated, as that wasn't complicated, probably more complicated than you can understand!
Lol people trying to show how complicated they can code php. :)