php-general Digest 30 Jul 2004 11:01:51 -0000 Issue 2907

Topics (messages 192254 through 192282):

Re: Conversion of Field Value to Hyperlink
        192254 by: rogerk.queernet.org
        192259 by: Curt Zirzow
        192261 by: Harlequin
        192269 by: John Nichel
        192271 by: John Nichel
        192272 by: John Nichel
        192274 by: Jason Barnett
        192275 by: Jason Barnett
        192279 by: Jason Wong

Re: Conversion of Field Value to Hyperlink OT
        192255 by: Jay Blanchard

Re: Variable functions within an object
        192256 by: Curt Zirzow
        192258 by: Jason Davidson

Re: Searching and removing
        192257 by: Jonathan Lassoff
        192260 by: Justin Patrin
        192262 by: Jonathan Lassoff
        192263 by: Justin Patrin
        192264 by: Justin Patrin
        192265 by: Matt M.

How to nest information from different tables.
        192266 by: Karl-Heinz Schulz
        192268 by: zareef ahmed

Re: Server's clock gone funny, maybe?
        192267 by: David Robley

Re: A native Windows binding for PHP
        192270 by: Manuel Lemos
        192273 by: Travis Low

Re: Browser reload problem
        192276 by: Jason Barnett

Re: reading txt file - certain lines
        192277 by: Rory McKinley

Splitting a string by the number of characters in the string?
        192278 by: Brent Clements
        192280 by: Justin Patrin
        192281 by: Jason Wong

Sending mail() using 5.0.0
        192282 by: Michael Purdy

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 ---
Quoting John Holmes <[EMAIL PROTECTED]>:

> > >   Why not simply 'Read The Fine Manual', or 'Read The Fantastic
> > > Manual'?  Why does it have to contain profanity?
> >
> > For all practical purposes:
> >
> >   RTFM == "read the manual"
> >
> > If someone finds it offensive then they're either delusional or paranoid or
> > more likely both!
>
> If I'm offended by the word "wong" what do that make me?

Wong-headed?!

--- End Message ---
--- Begin Message ---
* Thus wrote John Nichel:
> Harlequin wrote:
> >RTFM...?
> >
> 
> AKA : Read The F**king Manual

I thought the proper response was suppose to be: STFW :)
 

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
Mmmm...

Interesting Jay.

Maybe I'll just WTFM mate :)


-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I have a table generated by some code that returns certain field values
and
drops them into a table. On of these values is ID and I'd like to
convert it
to a hyperlink that people can use to go to another page to view further
information about a record. However:

The fields are not individually identified as I use a for statement and
I
think I might need to redesign the table but don't know where to start.

Can anyone provide any pointers please...?
[/snip]

RTFM.

If I need a hyperlink I have to code it even in a loop....i.e.

<?php
while($remi = mysql_fetch_object($dbemi)){
print("<tr>\n");
print("<td>" . $remi->bellname . "</td>\n");
print("<td><a href=\"batch.crm.php?bn=" . $remi->niiname . "\">"
. $remi->niiname . "</a> - click for batch report</td>\n");
print("<td align=\"right\">" . number_format($remi->bellcount,
0, '', ',') . "</td>\n");
print("<td align=\"right\">" . $remi->statdate . "</td>\n");
print("</tr>\n");
}
?>

--- End Message ---
--- Begin Message --- John Holmes wrote:
        Why not simply 'Read The Fine Manual', or 'Read The Fantastic
Manual'?  Why does it have to contain profanity?

For all practical purposes:

 RTFM == "read the manual"

If someone finds it offensive then they're either delusional or paranoid or more likely both!


If I'm offended by the word "wong" what do that make me?

A "wong-a-phobiac"? ;)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message --- Brian Dunning wrote:
I'm among those who are really pissed off when I see honest questions being answered with 'RTFM' or 'STFW'. I am relatively new to PHP, but by no means am I new to programming: like everyone else here, I already know how to RTFM and STFW. But sometimes I like to get an opinion from a real person: correct me if I'm wrong; is that not the purpose of a list??

The purpose of this list is to help those who are willing to help themselves. Rarely on this list will you see a RTFM reply to a well thought out question to a problem that isn't so well (if at all) documented. Asking for opinion's is fine too, and I don't think you'll find many on this list who will 'RTFM' someone asking for an opinion as long as the opinion hasn't been asked a gazillion times before ("What's the best editor to use for PHP?").


If you're going to answer with an insulting 'RTFM' or 'STFW' then don't even post. Your noise is not helpful. Go find a list where everyone already knows everything so you can masturbate all you want.

You're talking to people who have been on this list, helping people for years now (and I'm not speaking of myself), and your suggestion to them is to go elsewhere? What I find less helpful is a holier-than-thou soapbox speach.


--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
Curt Zirzow wrote:

* Thus wrote John Nichel:

Harlequin wrote:

RTFM...?


AKA : Read The F**king Manual


I thought the proper response was suppose to be: STFW :)

Oh man, that would have been perfect. I'm slipping in my old age. ;)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message --- Harlequin wrote:
Afternoon...

I have a table generated by some code that returns certain field values and
drops them into a table. On of these values is ID and I'd like to convert it

I wouldn't let users create their own primary key for any type of inserts, if that's what you're using ID for. Users could easily fake a form ID and put whatever data into an existing row with that ID.


to a hyperlink that people can use to go to another page to view further
information about a record. However:

The fields are not individually identified as I use a for statement and I
think I might need to redesign the table but don't know where to start.

Even with a for statement, you could create element names for each item in an array. But another solution is to create an array with the indexes you want to show and then foreach () over that array.

--- End Message ---
--- Begin Message --- Funny... for the short time I've been on the list, it seems like our most popular topics are the ones that involve flaming. I guess I need to get some charcoal for my barbecue pit, lest I be the one on the end of the fork ;)
--- End Message ---
--- Begin Message ---
On Friday 30 July 2004 06:57, John Holmes wrote:
> > >   Why not simply 'Read The Fine Manual', or 'Read The Fantastic
> > > Manual'?  Why does it have to contain profanity?
> >
> > For all practical purposes:
> >
> >   RTFM == "read the manual"
> >
> > If someone finds it offensive then they're either delusional or paranoid
> > or more likely both!
>
> If I'm offended by the word "wong" what do that make me?

I don't know, but you can enrol in my Camp for Correction of Undesirable and 
Negative Traits :) They'll have you sorted out in no time.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
You never go anywhere without your soul.
*/

--- End Message ---
--- Begin Message ---
[snip]
I'm among those who are really pissed off when I see honest questions 
being answered with 'RTFM' or 'STFW'. I am relatively new to PHP, but 
by no means am I new to programming: like everyone else here, I already 
know how to RTFM and STFW. But sometimes I like to get an opinion from 
a real person: correct me if I'm wrong; is that not the purpose of a 
list??

If you're going to answer with an insulting 'RTFM' or 'STFW' then don't 
even post. Your noise is not helpful. Go find a list where everyone 
already knows everything so you can masturbate all you want.

Please flame me back channel,
[/snip]

If your sensibilities are so offended and you need a PC list then I suggest that you 
start one. If you are going to ask questions that appear to have resulted from no 
research you must be prepared to be flamed. 

--- End Message ---
--- Begin Message ---
* Thus wrote Julio Sergio Santana:
> 
> class a {
>   var $fname;
>   function a() {
>     $this->fname = 'foo'; // the name of the function
>   }
> 
>   function execute() { // method to execute the named function
>     $this->fname();
>     // I also tried here
>     // {$this->fname}();
>     // ${this->fname}();
>     // "$this->fname"();

  $this->{$this->fname}();

  or (what it actually is doing.. )

  $func = $this->fname;
  $this->$func();

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
http://ca3.php.net/manual/en/function.call-user-func.php   ?

Jason

On Thu, 29 Jul 2004 17:11:50 -0500, Julio Sergio Santana
<[EMAIL PROTECTED]> wrote:
> I need to record the names of functions, and then use them later.
> Recently I found the following example within the on-line documentation:
> <?php
> function foo() {
>     echo "In foo()<br />\n";
> }
> 
> $func = 'foo';
> $func();        // This calls foo()
> 
> ?>
> 
> then I supposed that it was easy to extend this concept to objects and
> wrote the following case:
> 
> <?php
> 
> function foo() {
>     echo "In foo()<br />\n";
> }
> 
> class a {
>    var $fname;
>    function a() {
>      $this->fname = 'foo'; // the name of the function
>    }
> 
>    function execute() { // method to execute the named function
>      $this->fname();
>      // I also tried here
>      // {$this->fname}();
>      // ${this->fname}();
>      // "$this->fname"();
>      // but none of these worked
>    }
> }
> 
> $w = new a;
> $w->execute();
> 
> ?>
> 
> And this was the error I got:
> 
> X-Powered-By: PHP/4.1.2
> Content-type: text/html
> 
> <br>
> <b>Fatal error</b>:  Call to undefined function:  fname() in <b>-</b> on
> line <b>14</b><br>
> 
> I know that this can be solved easily with an intermediate variable:
> 
> $temp = $this->fname;
> $temp();
> 
> but I wonder if there is a more direct method.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
Justin Patrin <papercrane <at> gmail.com> writes:
> Assuming there's only one table in the document....
> 
> preg_match('!<table[^>]*>.*</table>!i', $text, $matches);
> $table = $matches[0];

Thanks! I thought that I was putting it into a variable, but poking around with
the script, it actually is just pooping out all the fetched data without putting
it into a variable. I can't really find documentation on some of the curl
functions, and I was wondering if you could provide some insight. Here is the
source: 

<HTML>
<BODY>
<?php
$ch = curl_init("http://www.infinitysf.com/beta/music/subsonic/default.asp";);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
#I thought I was echoing the variable here, but it shows it without this.->
echo($fp);
?>
</BODY>
</HTML>


--- End Message ---
--- Begin Message ---
On Thu, 29 Jul 2004 23:25:41 +0000 (UTC), Jonathan Lassoff
<[EMAIL PROTECTED]> wrote:
> Justin Patrin <papercrane <at> gmail.com> writes:
> > Assuming there's only one table in the document....
> >
> > preg_match('!<table[^>]*>.*</table>!i', $text, $matches);
> > $table = $matches[0];
> 
> Thanks! I thought that I was putting it into a variable, but poking around with
> the script, it actually is just pooping out all the fetched data without putting
> it into a variable. I can't really find documentation on some of the curl
> functions, and I was wondering if you could provide some insight. Here is the
> source:
> 
> <HTML>
> <BODY>
> <?php
> $ch = curl_init("http://www.infinitysf.com/beta/music/subsonic/default.asp";);
> curl_setopt($ch, CURLOPT_FILE, $fp);

You're not defining $fp before here, so it is unset. This probably
just tells curl to output to STDOUT.

> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_exec($ch);
> curl_close($ch);
> #I thought I was echoing the variable here, but it shows it without this.->
> echo($fp);

This doesn't echo anything as $fp is not defined anywhere above.

> ?>
> </BODY>
> </HTML>
> 

You could "fix" this script by actually giving it a file to output to
and reading it or by using output buffering to grab the output into a
string.

Or you could use some code which gives you a better interface for all
of this, such as:
http://pear.php.net/package/HTTP_Request

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
Justin Patrin <papercrane <at> gmail.com> writes:
> You could "fix" this script by actually giving it a file to output to
> and reading it or by using output buffering to grab the output into a
> string.
> 
> Or you could use some code which gives you a better interface for all
> of this, such as:
> http://pear.php.net/package/HTTP_Request

I would rather not put it into a file as it will be changing in real time
dynamically so it would put some strain on the filesystem. All I really want to
do now is just stick it into a string variable. How could I do that?

--- End Message ---
--- Begin Message ---
On Fri, 30 Jul 2004 00:06:33 +0000 (UTC), Jonathan Lassoff
<[EMAIL PROTECTED]> wrote:
> Justin Patrin <papercrane <at> gmail.com> writes:
> > You could "fix" this script by actually giving it a file to output to
> > and reading it or by using output buffering to grab the output into a
> > string.
> >
> > Or you could use some code which gives you a better interface for all
> > of this, such as:
> > http://pear.php.net/package/HTTP_Request
> 
> I would rather not put it into a file as it will be changing in real time
> dynamically so it would put some strain on the filesystem. All I really want to
> do now is just stick it into a string variable. How could I do that?
> 

Well, HTTP_Request will do it out of the box.

If you wanto use curl....look for more docs as I don't really know its
specifics. You can also look at the outputbuffering functions in the
PHP manual. (start with ob_star)

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
On Thu, 29 Jul 2004 17:25:10 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote:
> On Fri, 30 Jul 2004 00:06:33 +0000 (UTC), Jonathan Lassoff
> <[EMAIL PROTECTED]> wrote:
> > Justin Patrin <papercrane <at> gmail.com> writes:
> > > You could "fix" this script by actually giving it a file to output to
> > > and reading it or by using output buffering to grab the output into a
> > > string.
> > >
> > > Or you could use some code which gives you a better interface for all
> > > of this, such as:
> > > http://pear.php.net/package/HTTP_Request
> >
> > I would rather not put it into a file as it will be changing in real time
> > dynamically so it would put some strain on the filesystem. All I really want to
> > do now is just stick it into a string variable. How could I do that?
> >
> 
> Well, HTTP_Request will do it out of the box.
> 
> If you wanto use curl....look for more docs as I don't really know its
> specifics. You can also look at the outputbuffering functions in the
> PHP manual. (start with ob_star)
> 

I meant ob_start

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
> I would rather not put it into a file as it will be changing in real time
> dynamically so it would put some strain on the filesystem. All I really want to
> do now is just stick it into a string variable. How could I do that?

you could  just use http://us2.php.net/file_get_contents

--- End Message ---
--- Begin Message ---
I have two tables with relevant information's;

Table1 -> event
Table 2 -> eventdetails


I'm trying to list all events in table one plus to show for each event
whatever documents are available (file_name, information)

My code to list all events from the "event" table is:

<code>

<?php 
require("../admin/functions.php");
include("../admin/header.inc.php");

?>
<?
$event_query = mysql_query("select id, inserted, information, eventname,
date, title from event order by inserted desc LIMIT 0 , 30");
while($event = mysql_fetch_row($event_query)){

print("<b><span style=\"font-family: Arial, Helvetica,
sans-serif;color:#003300;font-size:14px;\">".html_decode($event[5])."</span>
</b><br>");
print("<span style=\"font-family: Arial, Helvetica,
sans-serif;font-size:12px;\">".html_decode($event[4])."</span><br>");
print("<span style=\"font-family: Arial, Helvetica,
sans-serif;font-size:12px;\">".html_decode($event[2])."</span><hr><p>");

print ( here I would need the list of all files associates with the event  "
$eventdetails_query = mysql_query("select filename, information from
eventdetails where event=".$id);"


}
?>

</code>

Can this be done and what would be the best approach?

TIA

Karl-Heinz



Tracking #: A3E9B485BFDA4A44A6BFCE20A805CA39C3D820DA

--- End Message ---
--- Begin Message ---
Hi,

You can use join or make this query as follows

$query="select *(or coulmn name) from event,
eventdetails where event.id = eventdetails.id";

zareef ahmed

--- Karl-Heinz Schulz <[EMAIL PROTECTED]> wrote:

> I have two tables with relevant information's;
> 
> Table1 -> event
> Table 2 -> eventdetails
> 
> 
> I'm trying to list all events in table one plus to
> show for each event
> whatever documents are available (file_name,
> information)
> 
> My code to list all events from the "event" table
> is:
> 
> <code>
> 
> <?php 
> require("../admin/functions.php");
> include("../admin/header.inc.php");
> 
> ?>
> <?
> $event_query = mysql_query("select id, inserted,
> information, eventname,
> date, title from event order by inserted desc LIMIT
> 0 , 30");
> while($event = mysql_fetch_row($event_query)){
> 
> print("<b><span style=\"font-family: Arial,
> Helvetica,
>
sans-serif;color:#003300;font-size:14px;\">".html_decode($event[5])."</span>
> </b><br>");
> print("<span style=\"font-family: Arial, Helvetica,
>
sans-serif;font-size:12px;\">".html_decode($event[4])."</span><br>");
> print("<span style=\"font-family: Arial, Helvetica,
>
sans-serif;font-size:12px;\">".html_decode($event[2])."</span><hr><p>");
> 
> print ( here I would need the list of all files
> associates with the event  "
> $eventdetails_query = mysql_query("select filename,
> information from
> eventdetails where event=".$id);"
> 
> 
> }
> ?>
> 
> </code>
> 
> Can this be done and what would be the best
> approach?
> 
> TIA
> 
> Karl-Heinz
> 
> 
> 
> Tracking #: A3E9B485BFDA4A44A6BFCE20A805CA39C3D820DA
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com


        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

--- End Message ---
--- Begin Message ---
On Fri, 30 Jul 2004 03:45, Matthew Sims wrote:

>>
>> [smartass mode to full power - nothing personl]
>> [/smartass mode]
> 
> Is that W3C HTML 4.01 compliant?
> 
I believe it is XNML - extended noob markup language


-- 
David Robley

Lawyers: The larval form of politicians.

--- End Message ---
--- Begin Message ---
Hello,

"Rubem Pechansky" <[EMAIL PROTECTED]> wrote in message..
I have designed and successfully prototyped a native Windows binding
for PHP. This binding is already capable of doing dialogs, controls,
and a lot more with very few lines of code. PHP can thus be used as a
tool for developing native Windows applications, so it can compete
with several much more expensive languages/environments. Go to
http://hypervisual.com/winbind/ for more details. This library will
eventually grow into a full-fledged IDE. I believe this idea has great
potential in the low-end market given the enormous installed base of
Windows users and the ever-growing interest about PHP.

I'd like to open the code source *and* make a profit at the same time
(although I'm not sure if that's possible), so I'm open to any ideas
or business opportunities regarding the large-scale development of
this product.

What do you think? Does this idea have potential? Would any serious
company be interested in investing on a project like this?

I think that once you have opened the source code, it is hard to make a profit just from its development.


On the other hand you can always open the source of the library and develop closed source extensions or tools that make the development of your library more powerful and useful so it will be an advantage for people to buy those extensions and tools from you instead of developing themselves.

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message --- Another way to make money on free software is consulting. Many organizations don't have the time, resources, or interest in adapting free software for their needs.

cheers,

Travis

Manuel Lemos wrote:
Hello,

"Rubem Pechansky" <[EMAIL PROTECTED]> wrote in message..

I have designed and successfully prototyped a native Windows binding
for PHP. This binding is already capable of doing dialogs, controls,
and a lot more with very few lines of code. PHP can thus be used as a
tool for developing native Windows applications, so it can compete
with several much more expensive languages/environments. Go to
http://hypervisual.com/winbind/ for more details. This library will
eventually grow into a full-fledged IDE. I believe this idea has great
potential in the low-end market given the enormous installed base of
Windows users and the ever-growing interest about PHP.

I'd like to open the code source *and* make a profit at the same time
(although I'm not sure if that's possible), so I'm open to any ideas
or business opportunities regarding the large-scale development of
this product.

What do you think? Does this idea have potential? Would any serious
company be interested in investing on a project like this?


I think that once you have opened the source code, it is hard to make a profit just from its development.

On the other hand you can always open the source of the library and develop closed source extensions or tools that make the development of your library more powerful and useful so it will be an advantage for people to buy those extensions and tools from you instead of developing themselves.

Regards,
Manuel Lemos


-- Travis Low <mailto:[EMAIL PROTECTED]> <http://www.dawnstar.com>

--- End Message ---
--- Begin Message --- Is there a question here? Or is this a resolution?
--- End Message ---
--- Begin Message ---
Dustin Krysak wrote:

<snip>

Now what I want to do is read this file, but only say read 5 songs worth, then I would place the PHP code in (another table) and display the next 5 songs and so on.... This just allows for a more flexible layout in the final presentation. the way I am having the text files written, there is no way to get it to produce seperate text files - otherwise this would be easy to do....
<snip>
What you can do (if you have access to a DB) is pull the text file into a single field table, using <br> as the line terminator. Looking at my MySQl book, for LOAD DATA, it says you can use a string to terminate the line.


Then you can just run a simple query on the table (limited to the equivalent lines for 5 songs), and together with a loop, output the results.

For big files, the DB will be faster and provides you with far greater flexibility

HTH

--
Rory McKinley
Nebula Solutions
+27 21 555 3227 - office
+27 21 551 0676 - fax
+27 82 857 2391 - mobile
www.nebula.co.za
====================

This e-mail is intended only for the person to whom it is addressed and
may contain confidential information which may be legally privileged.
Nebula Solutions accepts no liability for any loss, expense or damage
arising from this e-mail and/or any attachments.

--- End Message ---
--- Begin Message ---
In PHP 5 there is a awesome function called str_split, is there an equivalent in PHP 
4.x?

I need to do the following:

Split a 60 character string into 3 20 character array chunks.

using str_split I could easily do it, but how do I do it in PHP 4.x?

Thanks,
Brent

--- End Message ---
--- Begin Message ---
On Fri, 30 Jul 2004 02:44:19 -0500, Brent Clements
<[EMAIL PROTECTED]> wrote:
> In PHP 5 there is a awesome function called str_split, is there an equivalent in PHP 
> 4.x?
> 
> I need to do the following:
> 
> Split a 60 character string into 3 20 character array chunks.
> 
> using str_split I could easily do it, but how do I do it in PHP 4.x?
> 

RTFM! Look at the See Alsos in the manual on the page for str_split.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
On Friday 30 July 2004 15:44, Brent Clements wrote:
> In PHP 5 there is a awesome function called str_split, is there an
> equivalent in PHP 4.x?
>
> I need to do the following:
>
> Split a 60 character string into 3 20 character array chunks.
>
> using str_split I could easily do it, but how do I do it in PHP 4.x?

  substr()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Superstition, idolatry, and hypocrisy have ample wages, but truth goes
a-begging.
                -- Martin Luther
*/

--- End Message ---
--- Begin Message ---
Folks

I am running php 5.0.0 on Windows 2000

When using php-cgi.exe or php.exe for that matter I get the following error when using 
MAIL()

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" 
header missing in e:\http\cgi\mail.php on line 4

When using php-win.exe or an earlier version of php I have no problems.  Has anyone 
else ran into this problem?

Mike

--- End Message ---

Reply via email to