Jump to content

substr


Destramic

Recommended Posts

what im trying to d is substr a table name just to get the fisrt character so i can use it as an AS...example

 

FROM news AS n

 

$table = "news";
$as      = substr($table, 0, 1);

 

sigular named tables are fine...but if the table is named something like this news_comments and have many underscores i want it to return nc...what is the best way to achieve this please?

Link to comment
https://forums.phpfreaks.com/topic/224510-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.