Output HTML code in comman line with help of PHP

Output HTML code in comman line with help of PHP

am 09.09.2007 15:13:05 von orin

Hi!
If anybody knows how to output formatted HTML code in command line
[especially table(columns) structure] with help of PHP (or other way),
please help me.

With best regards, Orin

Re: Output HTML code in comman line with help of PHP

am 09.09.2007 16:04:03 von Jerry Stuckle

Orin wrote:
> Hi!
> If anybody knows how to output formatted HTML code in command line
> [especially table(columns) structure] with help of PHP (or other way),
> please help me.
>
> With best regards, Orin
>

echo "

Row 1, Column 1
\n";
?>

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Output HTML code in comman line with help of PHP

am 09.09.2007 17:56:46 von Shelly

"Jerry Stuckle" wrote in message
news:s_Wdndk5fNItYH7bnZ2dnUVZ_tbinZ2d@comcast.com...
> Orin wrote:
>> Hi!
>> If anybody knows how to output formatted HTML code in command line
>> [especially table(columns) structure] with help of PHP (or other way),
>> please help me.
>>
>> With best regards, Orin
>>
>
> > echo "

Row 1, Column 1
\n";
> ?>

Is THAT what he was asking? His "command line" statement confused me as to
what he wanted. I do a similar thing to what you suggested, but use a
single quote because I often add properties that need the double like:

stuff1 color="#FFFFFF">stuff2'; ?>

--
Shelly

Re: Output HTML code in comman line with help of PHP

am 09.09.2007 18:28:59 von Macca

I found a good website about PHP's Command Line Interface here:

http://www.php-cli.com/

Re: Output HTML code in comman line with help of PHP

am 09.09.2007 20:04:06 von orin

That's not the way... I'll try to explain what i exactly want:

I need to make a table and columns in console with specific data.
For example, like in MySql.

if i execute 'C:\>php cmd.php' i will see:
'

color="#FFFFFF">stuff2
stuff1
',

but i need a table.


With best regards, Orin

Re: Output HTML code in comman line with help of PHP

am 09.09.2007 20:08:43 von luiheidsgoeroe

On Sun, 09 Sep 2007 20:04:06 +0200, Orin wrote:

>
> That's not the way... I'll try to explain what i exactly want:
>
> I need to make a table and columns in console with specific data.
> For example, like in MySql.
>
> if i execute 'C:\>php cmd.php' i will see:
> '

> color=3D"#FFFFFF">stuff2
stuff1
',
>
> but i need a table.

An HTML table doesn't exist in a commandline context (just like you can'=
t =

use HTML form elements).
You can mimique a table with sprintf() though, just make sure you pad =

everything with the appropriate amount of spaces.
-- =

Rik Wasmus

Re: Output HTML code in comman line with help of PHP

am 10.09.2007 13:36:46 von Erwin Moller

Rik Wasmus wrote:
> On Sun, 09 Sep 2007 20:04:06 +0200, Orin wrote:
>
>>
>> That's not the way... I'll try to explain what i exactly want:
>>
>> I need to make a table and columns in console with specific data.
>> For example, like in MySql.
>>
>> if i execute 'C:\>php cmd.php' i will see:
>> '

>> color="#FFFFFF">stuff2
stuff1
',
>>
>> but i need a table.

Ectually, that IS a table. In html.

>
> An HTML table doesn't exist in a commandline context (just like you
> can't use HTML form elements).
> You can mimique a table with sprintf() though, just make sure you pad
> everything with the appropriate amount of spaces.

Yes, that or simply safe the output to a file and open that file in a
browser.
sprintf() is more fun. ;-)

Regards,
Erwin Moller