Jump to content

[SOLVED] Why wont this work?


Jpoel

Recommended Posts

It's because die() expects a string in order to print it. An integer cause that value to be returned to the calling program (assuming php was called by another program that expects a return value.)

If status is a string, this function prints the status just before exiting.

 

If status is an integer, that value will also be used as the exit status. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.

 

Note: PHP >= 4.2.0 does NOT print the status if it is an integer.

 

This works -

 

die("$MonthNumber");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.