Jump to content

Trouble with Substr


Markbhai

Recommended Posts

I am trying to determine which invoice type to print from my database, in order to set the correct template, one companies invoices start with a 'Y' whilst the others starts with a 'R' e.g.RM0002

 

I am therefore trying to use substr to dtermine which company the invoice belongs to (my database does not support 'company name').

 

The database field is invoice->invoice_number so my code is

 

elseif substr(($invoice->invoice_number),0,1) == R { ...rest of loop

 

Can anyone see what I am doing wrong?

 

Thanks

 

M

Link to comment
https://forums.phpfreaks.com/topic/283708-trouble-with-substr/
Share on other sites

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.