Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Replacing ) with a space when printing to screen



9:27 am on Feb 5, 2014 (gmt 0)

I have a lot of Mysql tables where up to 40% of some numeric fields are '0'

tables are set as UTF8

I am using the phpMyEdit system from playton and a typical NUM array for a field is produced by this type of code.

$opts['fdd']['other_no'] = array(
'default' => '',
'help|ACP' => 'Limit 4 digits',
'input' => '',
'maxlen' => 4,
'name' => 'GWR_#',
'options' => 'ACPVDFL',
'select' => 'T',
'size' => 4,
'sqlw' => 'TRIM("$val_as")',
'sort' => true
//$opts['fdd']['lner#'] ==0 ?'':$opts['fdd']['lner#'][' '];

The bottom line is my latest effort to schieve this but with no effect getting the php to replace the '0' with Null or " "
I felt this effort was getting close

Each table can contain up to 6 fields that require this change so I wonder if a single piece of code could work when ever a fiels held a "0"

I am not very good at this and I have been stumbling around with Server side stuff and Global variables all to no avail

So any help wouid be most appreaciated



5:07 pm on Feb 7, 2014 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

That particular index --
-- does not exist in the $opts['fdd'] array. So that is going to throw an error.

Featured Threads

Hot Threads This Week

Hot Threads This Month