PROGRAMMING SOLUTION
Toggle navigation
Menu
HOME
PHP
CODEIGNITER
MYSQL
1:26 AM
Unknown
CODEIGNITER
,
PHP
How to create one variable from foreach in php
SOLUTION WITH AN EXAMPLE:
// get doc_typs
$i=0;
$j='';
foreach ($types->result() as $row)
{
$j.="WHEN d.doc_type = '".$row->type."' THEN ".$i++.' ';
}
$when=$j;
// end get type
Email This
BlogThis!
Share to X
Share to Facebook
← Newer Post
Older Post →
Home
AJAX
ATOM
BOOTSTRAP
CHROME
CODEIGNITER
CSS
DataTable
Editors
ESET
Eset smart security 10
EXCEL
GIT
IntelliJ
MYSQL
PDF
PHP
SUBLIME
VISUAL STUDIO CODE
WAMPSERVER
X-editable