Thats what i'm talkin bout  . but there is no way to do it without using CSS eh?
Now how would i incorporate that into a PHP page. I'm trying to make a simple table showing a Specifier table that has the letter of the specifier then tabs and explains what it does. The way i have it written is a very tedious way and i would more than likely not do this if i was actually making a page but I started to teach myself PHP yesterday and i was playing with functions and passing variables. This is the code i have that makes the table. If you put this code into a PHP file you will see they do not align evenly, but it does work.
Code:
<html>
<head>
<title>Using PHP functions</title>
</head>
<body>
<?php
class MyClass{
function header(){
echo "<h1>Type Specifiers</h1><br>";
}
function LineBreaks(){
echo "<hr><br>";
}
function Tabbing(){
echo "         ";
}
function argumentText($type){
echo "<font face=\"Helvetica, Arail, Sans-Serif\">Displays and argument as a $type number</font><br>";
}
function integerText($type){
echo "<font face=\"Helvetica, Arail, Sans-Serif\">Displays an Integer as an $type number</font><br>";
}
function TextFormat($word, $size){
echo "<font size=\"$size\"
face=\"Helvetica, Arail, Sans-Serif\">$word</font>";
}
}
$formatting = new MyClass();
$formatting -> header();
$formatting -> LineBreaks();
$formatting -> TextFormat("Specifiers",4);
$formatting -> Tabbing();
$formatting -> TextFormat("Description",4);
echo "<br>";
$formatting -> LineBreaks();
echo "d";
$formatting -> Tabbing();
$formatting -> argumentText("decimal");
echo "b";
$formatting -> Tabbing();
$formatting -> integerText("binary");
echo "c";
$formatting -> Tabbing();
$formatting -> integerText("ASCII");
echo "f";
$formatting -> Tabbing();
$formatting -> integerText("float");
echo "o";
$formatting -> Tabbing();
$formatting -> integerText("octal");
echo "s";
$formatting -> Tabbing();
$formatting -> argumentText("string");
echo "x";
$formatting -> Tabbing();
$formatting -> integerText("lowercase heximaldecimal");
echo "X";
$formatting -> Tabbing();
$formatting -> integerText("uppercase haxidecimal");
?>
</body>
</html>
I tried putting
Code:
<style type="text/css">
P {
text-indent: 20px
}
</style>
In the head tag then putting
But it made a line break.
Last edited by The_Anomaly; 06-22-2005 at 02:37 PM..
|