I need to switch or convert the integer values from MySQL database to a string values in php, undescorejs -
this code; \socialkit\ui::view('timeline/user/info-bodybuild-row');
contains integer values database table 1, 2 , 3. passed frame $themedata['info_bodybuild_row']
display. code working viewing database, need change integer values string. datatype used in table enum type, , iam working on underscore.js framework.
if (! empty($timeline['bodybuild'])) { $bbt = \socialkit\ui::view('timeline/user/info-bodybuild-row'); $themedata['info_bodybuild_row'] = $bbt; }
values need change is,
1 = 6 pack
2 = fat
3 = thin
i run doesnot work resulting in error
$bbt = \socialkit\ui::view('timeline/user/info-bodybuild-row'); switch ($bbt) { case '1': $bb = "six pack"; break; case '2': $bb = "fat"; break; case '3': $bb = "thin": break; } $themedata['info_bodybuild_row'] = $bb;
thank in advance!!!
wiki
Comments
Post a Comment