Posts

Showing posts from January, 2019

How to seperate character from string in php

Lets see with example $string = "abcdef"; $result=[]; $strlen = strlen($string); for($i=0;$i<$strlen;$i++) {     $result[$i]=$string[$i];   } print_r($result);     $string = "abcdef"; $result=[]; $strlen = strlen($string); for($i=0;$i<$strlen;$i++) {     $result[$i]=$string[$i]; } print_r($result);

Show json data as drop-down menu

JSON Live Data Search using Ajax JQuery Employee Data Below is the complete code example you can use for live searching employee data with Ajax and jQuery. Copy it into your project files, but here it will display as code for readers: <div class="container" style="width: 900px;"> <h2 align="center">JSON Live Data Search using Ajax JQuery</h2> <h3 align="center">Employee Data</h3> <div align="center"> <input class="form-control" id="search" name="search" type="text" placeholder="Search employee..." /> </div> <ul class="list-group" id="result"></ul> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function(){ $.ajaxSetup({ cache: false }); $('#search').keyup(function(){ $('#...