/srv/disk16/3266814/www/phporacle.eu5.net/fwphp/www/help.php SAYS:

LINKS

I. Model (PDO application server)


CRUD MySQL encrypt_decrypt_password_hash.php   User CRUD PDO (first steps)  
AJAX search, CRUD    PDO SQLite search (filter rows)  
enter_tab_emul_validate_best.php 
login, reg, bootstrap, html    login_tutspoint   login   login_bookmark   login_secure   login_kalob
PDO Popel books, invoice items  
User login (first steps)  User login & bookmarks   Categories - things with pictures    UsrMsgs-jokes   
CRUD PDO Socnet Nixon 4thED, 2015   Gallery & Blog, Powers 2014   Gallery, Skoglund 2015   Gallery, Skoglund 2015, admin   Ullman JS 2012   
Kalendar original

II. View (CSS, JS), other

CSS responsive layouts Msg mnu&DBCRUD template - B12phpfw ver.4  - pagination, (tree classes for menus I tested, I do not use).   
Simplest page (this page based on Flexbox 2 columns  is simpler - css 70 lines + I added 70 !)   
OOP inherited menus        
HTML5 slideshow (W3)    
Flexbox     Flexbox sticky hdr ftr     Flexbox 2 columns     Flexbox kalendar
Stu Nicholls CSSplay template   CSSplay site     HFS & Ngrok DDNS (Tpl.2col)    

Help - Windows keys, GT TEXT - ocr
Oracle DB help 9 videos Forms 11g inst. (HTML)    Forms 12c inst. (HTML) 9 videos Forms 11g install (PHP)  

Other šđčćž Gulaš ...

III. Tests  (PHP app.server)

My tests & Demos ALL HELP SW (lsweb)   Help dir   PHPMyAdmin   PHP info
cURL test & SSL (https)

PHP frameworks Yii2 requir.   Yii2 (Caldarelli)     Laravel    Codeigniter 4 

BLOG (CMS type - summernote, gump)   Simple CMS   ...Simple CMS backend  usr/psw : admin/demo
RewriteEngine On
RewriteBase /fwphp/glomodul/help_sw/test/cms_extern/simplecms/
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*)$ index.php?pid=$1 [QSA,L]   
OLD CMS frontend (has Search) ...OLD CMS backend admin
OLD CMS2 frontend (has Search)   ...OLD CMS2 backend admin

BLOG (CMS type) external modules  YellowCMS files CRUD, search   WonderCMS 2.4.2 (Summernote)  
CMS Anchor  usr/psw : admin/admin1 
Pair php fw - users     Nano php fw

 



FAQ  Code snippets
~~~~~~~~~~~~~ ROUTING, see index.php and conf_... scripts
    
    php 7 has constants arrays - more elegant code
            
            


    ~~~~~~~~~~~~~ array_filter
    $myarray = array_filter($myarray, 'strlen'); //removes null values but leaves "0"
    $myarray = array_filter($myarray); //removes all null values
    array_values() returns all the values from the array and indexes the array numerically.
    //NOT SO : to preserve elem. i.e. exact string '0', needed is custom callback php>=5.3:
    $urlqry_arr=array_values(array_filter($urlqry_arr,function($value){return $value!=='';}));
    $urlqry_arr=array_values(array_filter($urlqry_arr, 'strlen'));

    ~~~~~~~~~~~~~ foreach
    foreach($urlqry_arr as $key => $val)
    {
    echo $key.'='; echo $val;
    //if (is_null($val) or !$val) unset($key); else echo ' --not (isnull($val) or !$val)';}
    //if ($val == '') unset($urlqry_arr($key)); // ERROR !!!
    }

    ~~~~~~~~~~~~~ VARIABLE VARIABLES and PASSING BY REFERENCE
    //cannot be used with PHP's Superglobal arrays within functions or class methods. 
    The variable $this is also a special variable that cannot be referenced dynamically.
    $varname = 'hello'; //eg loop: $IDm[oney_type] from entered item or from moneytypes tbl
    $$varname = 'world'; //same as $hello = 'world';
    echo "$varname ${$varname}"; //same as echo "$varname $hello"; //outputs: 'hello world'

    $string = "foo";
    ${$string}_bar = ""; // Creates the empty string $foo_bar

    $price_for_monday = 10;
    $price_for_tuesday = 20;
    $price_for_wednesday = 30;
    $today = 'tuesday';
    $price_for_today = ${'price_for_' . $today};
    echo $price_for_today; // will return 20


    $first_var = 1;
    $second_var = 2;
    $third_var = 3;
    $which_one = array_rand('first', 'second', 'third');

    //Let's consider the result is "second".
    $modifier = $$which_one; //Now $modifier has value 2.
    $modifier++; //Now $modifier's value is 3. <---------
    echo $second_var; //Prints out 2

    //Consider we wish to modify the value of $second_var
    $modifier = &$$which_one; //PASSING BY REFERENCE
    $modifier++; //Now value of $second_var is 3 too. <---------
    echo $second_var; //Prints out 3


    //to set variables if they don't have value yet:
    //this works under any scope, even when called inside another function!
    function setvar($n,$v=''){global $$n; if(!isset($$n)) $$n=$v ; }
    //~~~~~~~~~~~~~ e n d VARIABLE VARIABLES and PASSING BY REFERENCE