[Solved] Remove only 3 characters after a specific string

You can use regex to selecting target part of string and run it in preg_replace(). $url = “http://aaa-aaaa.com/bbbb-bbbbbbbbbb-2/it/clients/”; echo preg_replace(“@(.*)\w{2}/([^/]+/)$@”, “$1$2”, $url); See result of code in demo solved Remove only 3 characters after a specific string

[Solved] Php warning error [closed]

You don’t need to have any space and you MUST start session in the top! For example: <?php session_start(); header(‘Cache-control: private’); UPDATE: Don’t let blank space before <?php 6 solved Php warning error [closed]

[Solved] Facebook messenger bot Webhook not working [closed]

Add the other user to be a tester for the Facebook app, this will give them access to the bot before it is formally approved by Facebook. EDIT: Information regarding messenger bot submission can be found here: https://developers.facebook.com/docs/messenger-platform/app-review 3 solved Facebook messenger bot Webhook not working [closed]

[Solved] Need php script just like used by mysmartprice dot com on Go To Store button (URL Cloaking) [closed]

I’m not 100% sure if I got your question right, but this is my guess of you mean: Use PHP’s header method like this: <?php if(!isset($_GET[“p”])) exit(“No parameter \”p\””); $p = $_GET[“p”]; header(“LOCATION: $p”); ?> Save the file as redir.php and then use it as http://mysite.com/redir.php?p=http://google.com/. 1 solved Need php script just like used by … Read more

[Solved] get file content from url, then extract keywords [closed]

See this link. Don’t expect people to do your homework, study that code a little bit and you will find answer in less then 10 minutes. Basically when you decode json you will get object or array depending on what you want. So if you do this $data=json_decode($str);//$str is your json string foreach($data->items as $item){ … Read more

[Solved] HTML textarea with HTML support? [closed]

Use Tinymce or ckeditor. http://ckeditor.com/ http://www.tinymce.com/ And there are many more wysiwyg editor available. http://phphtmledit.com/ Cute Editor for PHP http://nicedit.com/ do some Googling and you will find many more. Good Luck 1 solved HTML textarea with HTML support? [closed]

[Solved] Explode string [ ]

Here’s one way with Javascript. You can split the string using regex. It can output an array and from there you can loop and assign the strings to the variables you need const str = “zoneAdd[1][home][group]” const strArr = str.replace(/[\[\]’]+/g,’ ‘).trim().split(‘ ‘) const task = strArr[0] const id = strArr[1] const place = strArr[2] const … Read more

[Solved] compare two table with row and column

Try: SELECT * FROM table1 WHERE folio = ‘123456’ AND cm_flag !=’X’ AND certificate_no NOT IN (SELECT CONCAT(certno1,’,’,certno2,’,’,certno3,’,’,certno4,’,’,certno5,’,’,certno6,’,’,certno7,’,’,certno8,’,’,certno9,’,’,certno10) FROM table2 WHERE tofolio = ‘123456’) 1 solved compare two table with row and column

[Solved] how to add checkbox intems in to data base in one row [closed]

If you want it all stored in one record, first remove the for() loop. Then you have a couple options take your pick: $emode = mysql_real_escape_string(json_encode($mode)); $emode = mysql_real_escape_string(serialize($mode)); $emode = mysql_real_escape_string(implode(‘,’,$mode)); Then you just have decode on the way out. 3 solved how to add checkbox intems in to data base in one row … Read more

[Solved] Slideshow in HTML5 [closed]

Php is a programming language not a database. You do not need a database for a slideshow, however you would use php to upload the images as well as list all the images in a directory. Once you accomplish that, you can pass the images to your slideshow. You can probably easily implement this script … Read more

[Solved] fetch the result based on the user postalcode [closed]

Fetch the latitude and longitude of user postal code by using this url example: http://maps.googleapis.com/maps/api/geocode/json?address=canada&components=postal_code:<user_postalcode>&sensor=false Then fetch the result using the below query SELECT Shop, latitude, longitude, ( 6371 * acos( cos( radians($lat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) – radians($lng ) ) + sin( radians($lat) ) * sin( … Read more

[Solved] My case switch is return me nothing

I woudn’t use an anonymous function here. You can assign the time_limit to the variable directly. <?PHP $link = mysqli_connect(“localhost”, “root”, “”, “table”); $q = mysqli_query($link, “SELECT * FROM sections WHERE id = ” . mysqli_real_escape_string($link,$_GET[‘id’] . ” “)); $time_limit = “”; while ($row = mysqli_fetch_assoc($q)) { $sections = $row[‘section’]; switch ($sections) { case “Solo”: … Read more