Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes===".$card['id']."") as $kat){
echo (kat['id_categories']);
}
table cols and values are all matched, something is wrong in this part of code
I tried adding $ before kat and using only one "=", sill doesnt work
NEW LINK
http://pastebin.com/RPK7vEaJ
this
where id_kartes===".$card['id']."
would be
where id_kartes=".$card['id']."
and missing $
echo $kat['id_categories'];
so full code :-
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes='".$card['id']."'") as $kat){
echo $kat['id_categories'];
}
best practice if you store your query result in a variable and loop over this variable.
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes=".$card['id']."") as $kat)
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
i know that has to be a trivial one. Can please somebody tell me how only to get the value of skills? how can i access it?
Appreciate.
You have different options to choose from:
In plain PHP you can do:
$skills = array_map(function($entry) {
return $entry->skills;
}, $arr);
With Laravel helpers you can do:
Arr::pluck($arr, 'skills');
Your data looks like models so in that case, you might be able to do this as well:
YourModel::get()->pluck('skills'); //or
$yourCollection->pluck('skills');
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have this pattern:
preg_replace_callback('##abc\((.*?)\)(.*?)#end.#is', ..
My template string:
$test = "#abc('test')<h1>test</h1>#end"; // not working
$test2 = "#abc('test')<h1>test</h1>#end "; // working
Why it doesn't work if there's no space after #end?
As #Rizier123 pointed out, this is the correct regex:
preg_replace_callback('##abc\((.*?)\)(.*?)#end#is', ..
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I get this error while trying to update. The query works in phpmyadmin just fine.
Was a bind error, all fixed thanks to the great people here.
That's because you've got typo in your parameters.
You are using :serreceivetxt instead of :userreceivetxt and :serreceiveemail instead of :userreceiveemail.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
header("Location: {$TBDEV['baseurl']}/login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]));
Is it a variable? PHP reserved word? something to do with HTML?
It's a $_GET parameter. When you submit the code, the page receiving it will be able to use $_GET['returnto'] to return you to the page you're currently on.
Take some time to learn about $_GET
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have an error in a single line of code but I can't seem to find it. I've tried changing the quotes to all match but that doesn't do anything. Please help. here is where the error is
$managerID = preg_replace('#[^0-9]#i',",$_SESSION["id"]);
try this :
$managerID = preg_replace('#[^0-9]#i','',$_SESSION["id"]);
btw i dont know what you are trying to do i just solved your syntax error ;)