Forum Moderators: coopster

Message Too Old, No Replies

Adding a tab

         

bodycount

4:02 pm on May 21, 2009 (gmt 0)

10+ Year Member



How can I add a TAB into the following below where it says TAB

$TWODBAR = $DATE . TAB . $SERIALNO . TAB . $IMEI . TAB . $IMSI . TAB . $VOICENO . TAB . $DATANO . TAB . $NETWORK;

I need it to add the tab into a 2d bar code so when it is scanned on the web page it tabs to the next line. Also i might need to add quotes at the beginning and the end of the string.

I need the string which is going into the database to look either like

"date<TAB>serial<TAB>imei<TAB>"

or

date<TAB>serial<TAB>imei<TAB>

How would i do this?

Thanks

CyBerAliEn

9:15 pm on May 21, 2009 (gmt 0)

10+ Year Member



In PHP (on a UNIX system) you can insert a tab into a string with the characters '\t' just as '\n' will insert a new line. Thus, try something like:

$TAB = "\t";

$TWODBAR = $DATE . $TAB . $SERIALNO . $TAB . $IMEI . $TAB . $IMSI . $TAB . $VOICENO . $TAB . $DATANO . $TAB . $NETWORK;

bodycount

8:22 am on May 22, 2009 (gmt 0)

10+ Year Member



WOW it is as simple as that.

It does exactly what I wanted

Thank you very much

Rob.