Entries for: PHP!
<< Back

Sub Categories

URL Request Handling

SEO Friendly URLs with PHP

Views: 785
Created: 2020-08-26 01:30:46
Modified: 2023-09-20 15:21:37

ModRewrite needs to be enabled in apache2 by executing:<br /> a2enmod rewrite Modify your HTaccess File like this if index.php is your main php File: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?i=$1 [L,QSA] &nbsp; For example, if the user enters the UR...

String Operations

Check if String exists in String

Views: 648
Created: 2020-11-07 16:04:34
Modified: 2023-09-22 03:52:15

&nbsp;Here code to check if a string exists in another string! $string = &#39;This is a String&#39;;<br /> if (strpos($string , &#39;This&#39;) !== false) {<br /> &nbsp;&nbsp;&nbsp; echo &#39;true&#39;; # STRING CONTAINS WORD &quot;This&quot;<br /> } else {<br /> # String not f...

Replace in a String

Views: 683
Created: 2020-11-07 16:02:41
Modified: 2023-09-22 11:47:47

Example of replacing a sign in a string (works with more than one sign) &nbsp; $newstring = str_replace(&quot;TEXT&quot;, &quot;NEW TEXT&quot;, $initialstring); ...

Warning: Array to string conversion in /home/bugfish/public_html/_site/btm/init.php on line 82
Switches: 0 | Arrivals: 0 | Visits: 0
This Website is using Session Cookies for Site Functionality.