![]() |
comma seperated values only display first value
Trying to achive :
1) Admin can set usergroups who can acces/use this app, in his cp 2) its stored in a table>colum , ELoptions > Optionallowed I get the data in php like this PHP Code:
HTML Code:
<if condition="is_member_of($bbuserinfo, $permissionPOSTER[Optionallowed])"> and they work fine, but they also are just 1 = enable 0 = disabled. This is stored as TEXT in the db due to the "comma's" between the numbers Since it dint work and only showed the wery first number admin sets in cp i tryed to display the contents in a table to see what was going on. and true it only shows the first number all others are ignored ewen if i try to write a sentence or do anything else only the first character is enabled.. What am i doing wrong, is it the htmlspecialchars_uni ? i dont get it should i pull the data with an array instead, ewen with the table only containing 1 row. :confused: |
You're close, try this:
PHP Code:
|
ohhh preg_split never knew...
Thank you! |
Unless I'm understanding something wrong, can't you just use explode() instead?
|
You could, but explode has a very specific delimiter - with the preg_split he can match comma separated values, as well as comma and space separated values.
|
All times are GMT. The time now is 05:24 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|