how to format one element of multi array (of php) in jquery part code -
when login part of code executed:
$_session['user'] = array('user_id' => $user[0]['user_id'], 'ip' => $_server['remote_addr']);
now on upfollowing php page code has read user_id
$.tablesorter.setfilters( table, ['', '<?=$_session["favcolor"];?>' ], true);
where 'favcolor' is, needs 'user_id' be...
but how format that?
i thought so: (i got idea site, thougth multi array http://www.w3schools.com/php/php_arrays_multi.asp )
'<?=$_session[0][1];?>'
but not work..
so how should formated then?
pls help
almost there, word 'array' in column
$.tablesorter.setfilters( table, ['', '<?=$_session["user"];?>' ], true);
you can use $_session['user']['user_id']
access user_id
$_session
array.
in :
$.tablesorter.setfilters( table, ['', '<?=$_session["user"];?>' ], true);
you getting array
because $_session["user"]
array containing user_id
, ip
. need specify index user_id
retrieving value of user_id
that.
nice article and very useful thank so for multidimensional array
ReplyDeleteJavacodegeeks
ReplyDeletewelookups PHP Multidimensional Arrays
ReplyDeleteC# for loop structure of C# is like an all-in-one looping utility. The C# for loop acts like the while loop only with some extra features. The syntax of a C# for loop is quite different compared to the other two looping structures.
ReplyDelete
ReplyDeleteThanks for sharing valuable information about PHP Programming Help. Using online writing services, students can score good grades in their project submission.
PHP Assignment Help
PHP Homework Help
PHP Programming Help