php-windows Digest 15 Nov 2003 19:46:54 -0000 Issue 2001
Topics (messages 22102 through 22104):
Re: NewComer Code
22102 by: Piotr Pluciennik
22103 by: Rocco CAstoro
GD Lib
22104 by: S F Alim
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I'm afraid not...
this function doesn't return string. Your function prints string...
If you want your function to return string, try below example:
function table4Strings( $string1, $string2, $string3, $string4 )
{
return "<table
border=1><tr><td>$string1</td><td>$string2</td><td>$string3</td><td>$string4</td></tr></table>";
}
and use it:
echo table4Strings(1, 2, 3, 4);
HTH
Piotr
Rocco CAstoro wrote:
> Would this be the best and most efficent way to create a function that
> accepts four string variables and returns a string that contains an HTML
> table element, enclosing each of the variables in its own cell :
>
> <?php
> function table4Strings( $string1, $string2, $string3, $string4 )
> {
> print "<table border=1>";
> print "<tr>";
> print "<td>$string1</td>";
> print "<td>$string2</td>";
> print "<td>$string3</td>";
> print "<td>$string4</td>";
> print "</tr>";
> print "</table>";
> }
> table4Strings(1, 2, 3, 4);
> ?>
>
> Thanks much, reading Sams teach yourself PHP4 in 24 Hours.. Pretty
> informative..
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thank you very much, this was exactly the help I was looking for!
"Piotr Pluciennik" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm afraid not...
> this function doesn't return string. Your function prints string...
>
> If you want your function to return string, try below example:
>
> function table4Strings( $string1, $string2, $string3, $string4 )
> {
> return "<table
>
border=1><tr><td>$string1</td><td>$string2</td><td>$string3</td><td>$string4
</td></tr></table>";
>
> }
>
> and use it:
>
> echo table4Strings(1, 2, 3, 4);
>
> HTH
> Piotr
>
> Rocco CAstoro wrote:
>
> > Would this be the best and most efficent way to create a function that
> > accepts four string variables and returns a string that contains an HTML
> > table element, enclosing each of the variables in its own cell :
> >
> > <?php
> > function table4Strings( $string1, $string2, $string3, $string4 )
> > {
> > print "<table border=1>";
> > print "<tr>";
> > print "<td>$string1</td>";
> > print "<td>$string2</td>";
> > print "<td>$string3</td>";
> > print "<td>$string4</td>";
> > print "</tr>";
> > print "</table>";
> > }
> > table4Strings(1, 2, 3, 4);
> > ?>
> >
> > Thanks much, reading Sams teach yourself PHP4 in 24 Hours.. Pretty
> > informative..
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi all,
I m running PHP 4.3.3 on IIS 5.0, and I believe that I don't have GD
library installed or it's not working, and im totally new to this, so
if any kind enuff to tell me where shall I look and how can I install
(if its not there).
Thanks in advance.
Regards,
S F Alim.
--- End Message ---