ad. if etc.
-> http://at.php.net/manual/de/language.co ... ctures.php
-> http://at.php.net/manual/de/language.operators.php
das zu wissen ist an sich grund elementar um jetzt weiter zu machen.
Das Diskussionsforum zum Open Source Content Management System
https://forum.contenido.org/
Code: Alles auswählen
$catIds = conDeeperCategoriesArray($catStart);
Code: Alles auswählen
/**
*
* Fetch all deeper categories by a given id
*
* @param int $idcat Id of category
* @return array Array with all deeper categories
*
* @author Olaf Niemann <olaf.niemann@4fb-de>
* Jan Lengowski <jan.lengowski@4fb.de>
*
* @copyright four for business AG <www.4fb.de>
*/
function conDeeperCategoriesArray($idcat_start)
{
global $db, $client, $cfg;
$sql = "SELECT
*
FROM
".$cfg["tab"]["cat_tree"]." AS A,
".$cfg["tab"]["cat"]." AS B
WHERE
A.idcat = B.idcat AND
idclient = '".$client."'
ORDER BY
idtree";
$db->query($sql);
$i = 0;
while ( $db->next_record() ) {
if ($db->f("parentid") < $idcat_start) { // ending part of tree
$i = 0;
}
if ($db->f("idcat") == $idcat_start) { // starting part of tree
$i = 1;
}
if ($i == 1) {
$catstring[] = $db->f("idcat");
}
}
return $catstring;
}
Code: Alles auswählen
global $db, $client, $cfg;
Code: Alles auswählen
echo '<table cellpadding="0" cellspacing="0" border="0"><tr>';
echo '<td><img src="images/wuerfel.gif"></td>';
Code: Alles auswählen
$string = "hello world - \"my world\"\n";
echo $string;
Code: Alles auswählen
hello world - "my world"[+ line break]
Code: Alles auswählen
$string = 'hello world - "my world"\n';
echo $string;
Code: Alles auswählen
hello world - "my world"\n
Code: Alles auswählen
$string = 'hello world - "my world"'."\n";
echo $string;
Code: Alles auswählen
hello world - "my world"[+ line break]
Code: Alles auswählen
$string = 'hello world - "my world"'."\n";
echo "this -> $string";
Code: Alles auswählen
this -> hello world - "my world"[+ line break]
Code: Alles auswählen
$string = 'hello world - "my world"'."\n";
echo 'this -> $string';
Code: Alles auswählen
this -> $string
Code: Alles auswählen
if (is_array($catIds)) {
...
}
Code: Alles auswählen
$a = 1;
$b = 1;
if ($a == $b)
echo "ident !";
echo "echt wahr";
echo "end of line";
Code: Alles auswählen
ident !echt wahrend of line
Code: Alles auswählen
$a = 1;
$b = 2;
if ($a == $b) {
echo "ident !";
echo "echt wahr";
}
echo "end of line";
Code: Alles auswählen
end of line
Code: Alles auswählen
if ( !is_object($db) ) {
$db = new DB_Contenido;
}
Code: Alles auswählen
$sql = "SELECT
CAT.idcat AS idcat,
name
FROM
".$cfg["tab"]["cat"]." AS CAT,
".$cfg["tab"]["cat_lang"]." AS CATLANG
WHERE
CAT.idcat = ".$val."
AND CAT.idcat = CATLANG.idcat
AND CATLANG.idlang = '$lang'
AND CATLANG.visible = '1'";
$db->query($sql);
Code: Alles auswählen
SELECT CAT.idcat AS idcat, name FROM con_cat AS CAT, con_cat_lang AS CATLANG WHERE CAT.idcat = 1 AND CAT.idcat = CATLANG.idcat AND CATLANG.idlang = '1' AND CATLANG.visible = '1'
Code: Alles auswählen
$sql = "SELECT
A.idcat AS idcat,
name
FROM
".$cfg["tab"]["cat"]." AS A,
".$cfg["tab"]["cat_lang"]." AS B
WHERE
A.idcat = ".$val."
AND A.idcat = B.idcat
AND B.idlang = '$lang'
AND B.visible = '1'";
$db->query($sql);
Code: Alles auswählen
$sql = "SELECT
A.idcat AS idcat,
name
Code: Alles auswählen
$db->query($sql);
Code: Alles auswählen
while ($db->next_record()) {
echo '<td height="21" class=".navigation" style="border: 0px; border-top:1px; border-color: #F7C473; border-style: dashed; background-color: #FFFFFF; padding-left:7px; padding-right:7px;">
<a class="klein" href="front_content.php?idcat='.$db->f("idcat").'">'.$db->f("name").'</a></td>';
} // end while
Code: Alles auswählen
while ($db->next_record()) {
echo 'front_content.php?idcat='.$db->f("idcat").' -> '.$db->f("name");
} // end while
Code: Alles auswählen
SELECT A.idcat as idcat, name ...
Code: Alles auswählen
echo "test".'was auch immer "jaja "."end";
Code: Alles auswählen
echo "test".'was auch immer "jaja "'."end";
Code: Alles auswählen
<?php
@include (implode (DIRECTORY_SEPARATOR , array_slice(explode(DIRECTORY_SEPARATOR , dirname(__FILE__)), 0, -3)) . DIRECTORY_SEPARATOR . "includes" . DIRECTORY_SEPARATOR . "config.php"); ?>
Code: Alles auswählen
<?php
@include (implode (DIRECTORY_SEPARATOR , array_slice(explode(DIRECTORY_SEPARATOR , dirname(__FILE__)), 0, -3)) . DIRECTORY_SEPARATOR . "includes" . DIRECTORY_SEPARATOR . "config.php"); ?>