You are here:  » Php function like function in Excel

Support Forum



Php function like function in Excel

Submitted by shogounou on Mon, 2009-05-18 13:37 in

Hi David

I need to isolate the fisrt letter of merchand name for database request or sometime the second or the third one.

For exemple Merchand piximania I need to highlight just the firt letter Piximania --> p
For ID merchand of my feed, I need to isolate the second letter
834 --> 2

In php code how could we build a function like excel function to respond to my need ?

Best regard

Submitted by support on Mon, 2009-05-18 14:24

Hello,

You can use substr() to get any letter of a value. For example...

  substr($myString,0,1)

...will return the first letter, or...

  substr($myString,1,1)

Cheers,
David.

Submitted by shogounou on Mon, 2009-05-18 14:40

David

If you does not exist, we should have to design.

Big thank you

Guillaume