{"id":1235,"date":"2016-02-01T18:56:16","date_gmt":"2016-02-01T18:56:16","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=1235"},"modified":"2016-04-22T16:27:31","modified_gmt":"2016-04-22T16:27:31","slug":"autocomplete-textbox-multiple-values-jquery-php-mysql","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/","title":{"rendered":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL"},"content":{"rendered":"<p>In our previous <a href=\"http:\/\/www.codexworld.com\/autocomplete-textbox-using-jquery-php-mysql\/\">jQuery UI Autocomplete tutorial<\/a>, we have shown how to display auto-suggestions from the database under the textbox in PHP. But it was for single selection. In this tutorial, you&#8217;ll learn how to implement <b>autocomplete textbox with multiple values selection in PHP<\/b>. We&#8217;ll use jQuery UI Autocomplete to show the suggestions from the MySQL database and users would be able to select multiple values.<\/p>\n<p>Along with the autocomplete functionality, we&#8217;ll show how you can restrict the limitation on multiple values selection and get multiple values from multiple sources.<\/p>\n<h2>jQuery UI &#038; jQuery Library<\/h2>\n<p>At first, you should need to include the jQuery UI stylesheet, jQuery library, and jQuery UI library.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">link<\/span> <span style=\"color:#bf4f24\">rel<\/span>=<span style=\"color:#0b6125\">\"stylesheet\"<\/span> <span style=\"color:#bf4f24\">href<\/span>=<span style=\"color:#0b6125\">\"\/\/code.jquery.com\/ui\/1.11.4\/themes\/smoothness\/jquery-ui.css\"<\/span>>\r\n&lt;<span style=\"color:#bf4f24\">script<\/span> <span style=\"color:#bf4f24\">src<\/span>=<span style=\"color:#0b6125\">\"\/\/code.jquery.com\/jquery-1.10.2.js\"<\/span>>&lt;\/<span style=\"color:#bf4f24\">script<\/span>>\r\n&lt;<span style=\"color:#bf4f24\">script<\/span> <span style=\"color:#bf4f24\">src<\/span>=<span style=\"color:#0b6125\">\"\/\/code.jquery.com\/ui\/1.11.4\/jquery-ui.js\"<\/span>>&lt;\/<span style=\"color:#bf4f24\">script<\/span>>\r\n<\/pre>\n<h2>jQuery UI Autocomplete with Multiple Values<\/h2>\n<p>In this example, we&#8217;ll display a textbox for skills entry. Once the user starts writing skills, the autosuggestion skills would be listed under the textbox. These skills auto suggestion would be fetched from the <b>skills<\/b> table of MySQL database in <code>skills.php<\/code> file and returns Json data to <code>source<\/code> option.<\/p>\n<p><b>JavaScript:<\/b><br \/>\nThe selector (<code>#skills<\/code>) of autocomplete function should match with the textbox ID and respective data source file should provide into source option.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">script<\/span>>\r\n<span style=\"color:#691c97\">$<\/span>(<span style=\"color:#a71d5d;font-style:italic\">function<\/span>() {\r\n    <span style=\"color:#a71d5d;font-style:italic\">function<\/span> <span style=\"color:#bf4f24\">split<\/span>( val ) {\r\n        <span style=\"color:#794938\">return<\/span> val.<span style=\"color:#693a17\">split<\/span>(<span style=\"color:#cf5628\"> \/,<span style=\"color:#811f24;font-weight:700\">\\s<\/span>*\/<\/span> );\r\n    }\r\n    <span style=\"color:#a71d5d;font-style:italic\">function<\/span> <span style=\"color:#bf4f24\">extractLast<\/span>( term ) {\r\n        <span style=\"color:#794938\">return<\/span> <span style=\"color:#693a17\">split<\/span>( term ).<span style=\"color:#693a17\">pop<\/span>();\r\n    }\r\n    \r\n    <span style=\"color:#794938\">$<\/span>( <span style=\"color:#0b6125\">\"#skills\"<\/span> ).bind( <span style=\"color:#0b6125\">\"keydown\"<\/span>, <span style=\"color:#a71d5d;font-style:italic\">function<\/span>( <span style=\"color:#691c97\">event<\/span> ) {\r\n        <span style=\"color:#794938\">if<\/span> ( <span style=\"color:#691c97\">event<\/span>.keyCode <span style=\"color:#794938\">===<\/span> <span style=\"color:#794938\">$<\/span>.ui.keyCode.TAB <span style=\"color:#794938\">&amp;<\/span><span style=\"color:#794938\">&amp;<\/span>\r\n            <span style=\"color:#794938\">$<\/span>( <span style=\"color:#234a97\">this<\/span> ).autocomplete( <span style=\"color:#0b6125\">\"instance\"<\/span> ).menu.active ) {\r\n            <span style=\"color:#691c97\">event<\/span>.preventDefault();\r\n        }\r\n    })\r\n    .autocomplete({\r\n        minLength: <span style=\"color:#811f24;font-weight:700\">1<\/span>,\r\n        <span style=\"color:#bf4f24\">source<\/span>: <span style=\"color:#a71d5d;font-style:italic\">function<\/span>( request, response ) {\r\n            <span style=\"color:#5a525f;font-style:italic\">\/\/ delegate back to autocomplete, but extract the last term<\/span>\r\n            <span style=\"color:#794938\">$<\/span>.getJSON(<span style=\"color:#0b6125\">\"skills.php\"<\/span>, { term : extractLast( request.term )},response);\r\n        },\r\n        <span style=\"color:#bf4f24\">focus<\/span>: <span style=\"color:#a71d5d;font-style:italic\">function<\/span>() {\r\n            <span style=\"color:#5a525f;font-style:italic\">\/\/ prevent value inserted on focus<\/span>\r\n            <span style=\"color:#794938\">return<\/span> <span style=\"color:#811f24;font-weight:700\">false<\/span>;\r\n        },\r\n        <span style=\"color:#bf4f24\">select<\/span>: <span style=\"color:#a71d5d;font-style:italic\">function<\/span>( event, ui ) {\r\n            <span style=\"color:#a71d5d;font-style:italic\">var<\/span> terms <span style=\"color:#794938\">=<\/span> <span style=\"color:#693a17\">split<\/span>( <span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span> );\r\n            <span style=\"color:#5a525f;font-style:italic\">\/\/ remove the current input<\/span>\r\n            terms.<span style=\"color:#693a17\">pop<\/span>();\r\n            <span style=\"color:#5a525f;font-style:italic\">\/\/ add the selected item<\/span>\r\n            terms.<span style=\"color:#693a17\">push<\/span>( ui.item.<span style=\"color:#b4371f\">value<\/span> );\r\n            <span style=\"color:#5a525f;font-style:italic\">\/\/ add placeholder to get the comma-and-space at the end<\/span>\r\n            terms.<span style=\"color:#693a17\">push<\/span>( <span style=\"color:#0b6125\">\"\"<\/span> );\r\n            <span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span> <span style=\"color:#794938\">=<\/span> terms.<span style=\"color:#693a17\">join<\/span>( <span style=\"color:#0b6125\">\", \"<\/span> );\r\n            <span style=\"color:#794938\">return<\/span> <span style=\"color:#811f24;font-weight:700\">false<\/span>;\r\n        }\r\n    });\r\n});\r\n&lt;\/<span style=\"color:#bf4f24\">script<\/span>>\r\n<\/pre>\n<p><b>HTML:<\/b><br \/>\nTextbox ID should be matched with the selector of autocomplete function.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">label<\/span> <span style=\"color:#bf4f24\">for<\/span>=<span style=\"color:#0b6125\">\"skills\"<\/span>>Tag your skills: &lt;\/<span style=\"color:#bf4f24\">label<\/span>>\r\n&lt;<span style=\"color:#bf4f24\">input<\/span> <span style=\"color:#bf4f24\">id<\/span><span style=\"color:#794938\">=<\/span><span style=\"color:#0b6125\">\"skills\"<\/span> <span style=\"color:#bf4f24\">size<\/span>=<span style=\"color:#0b6125\">\"50\"<\/span>>\r\n<\/pre>\n<h2>jQuery UI Autocomplete Limit on Multiple Values<\/h2>\n<p>The functionality of this example is same as the previous example, we only add one extra functionality on it. We&#8217;ll add a restriction on multiple selections. If the user exceeds the limitation of selection, extra values would be removed from the textbox.<\/p>\n<p>For adding limitation, place the following JavaScript in select event. Here we have added the limit of 3, you can change it as per your need.<\/p>\n<pre><span style=\"color:#bf4f24\">select<\/span>: <span style=\"color:#a71d5d;font-style:italic\">function<\/span>( event, ui ) {\r\n    <span style=\"color:#a71d5d;font-style:italic\">var<\/span> terms <span style=\"color:#794938\">=<\/span> <span style=\"color:#693a17\">split<\/span>( <span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span> );\r\n    <span style=\"color:#794938\">if<\/span>(terms<span style=\"color:#693a17\">.length<\/span> <span style=\"color:#794938\">&lt;=<\/span> <span style=\"color:#811f24;font-weight:700\">3<\/span>) {\r\n        <span style=\"color:#5a525f;font-style:italic\">\/\/ remove the current input<\/span>\r\n        terms.<span style=\"color:#693a17\">pop<\/span>();\r\n        <span style=\"color:#5a525f;font-style:italic\">\/\/ add the selected item<\/span>\r\n        terms.<span style=\"color:#693a17\">push<\/span>( ui.item.<span style=\"color:#b4371f\">value<\/span> );\r\n        <span style=\"color:#5a525f;font-style:italic\">\/\/ add placeholder to get the comma-and-space at the end<\/span>\r\n        terms.<span style=\"color:#693a17\">push<\/span>( <span style=\"color:#0b6125\">\"\"<\/span> );\r\n        <span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span> <span style=\"color:#794938\">=<\/span> terms.<span style=\"color:#693a17\">join<\/span>( <span style=\"color:#0b6125\">\", \"<\/span> );\r\n        <span style=\"color:#794938\">return<\/span> <span style=\"color:#811f24;font-weight:700\">false<\/span>;\r\n    }<span style=\"color:#794938\">else<\/span>{\r\n        <span style=\"color:#a71d5d;font-style:italic\">var<\/span> last <span style=\"color:#794938\">=<\/span> terms.<span style=\"color:#693a17\">pop<\/span>();\r\n        <span style=\"color:#691c97\">$<\/span>(<span style=\"color:#234a97\">this<\/span>)<span style=\"color:#693a17\">.val<\/span>(<span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span>.<span style=\"color:#693a17\">substr<\/span>(<span style=\"color:#811f24;font-weight:700\">0<\/span>, <span style=\"color:#234a97\">this<\/span>.<span style=\"color:#b4371f\">value<\/span><span style=\"color:#693a17\">.length<\/span> <span style=\"color:#794938\">-<\/span> last<span style=\"color:#693a17\">.length<\/span> <span style=\"color:#794938\">-<\/span> <span style=\"color:#811f24;font-weight:700\">2<\/span>)); <span style=\"color:#5a525f;font-style:italic\">\/\/ removes text from input<\/span>\r\n        <span style=\"color:#691c97\">$<\/span>(<span style=\"color:#234a97\">this<\/span>).effect(<span style=\"color:#0b6125\">\"highlight\"<\/span>, {}, <span style=\"color:#811f24;font-weight:700\">1000<\/span>);\r\n        <span style=\"color:#691c97\">$<\/span>(<span style=\"color:#234a97\">this<\/span>)<span style=\"color:#693a17\">.attr<\/span>(<span style=\"color:#0b6125\">\"style\"<\/span>,<span style=\"color:#0b6125\">\"border: solid 1px red;\"<\/span>);\r\n        <span style=\"color:#794938\">return<\/span> <span style=\"color:#811f24;font-weight:700\">false<\/span>;\r\n    }\r\n}\r\n<\/pre>\n<h2>jQuery UI Autocomplete with Multiple Values from Different Sources<\/h2>\n<p>This example shows how to provide autocomplete from the different source file. Degrees auto-suggestion will be displayed at the time of first value selection and skills auto-suggestion will be displayed from the second values selection.<\/p>\n<p>Place the following JavaScript in source option. Here you can see first autocomplete is getting from <code>degrees.php<\/code> source and second autocomplete is getting from <code>skills.php<\/code> source.<\/p>\n<pre><span style=\"color:#bf4f24\">source<\/span>: <span style=\"color:#a71d5d;font-style:italic\">function<\/span>( request, response ) {\r\n    <span style=\"color:#a71d5d;font-style:italic\">var<\/span> terms <span style=\"color:#794938\">=<\/span> <span style=\"color:#693a17\">split<\/span>( request.term );\r\n    <span style=\"color:#794938\">if<\/span> (terms<span style=\"color:#693a17\">.length<\/span> <span style=\"color:#794938\">&lt;<\/span> <span style=\"color:#811f24;font-weight:700\">2<\/span>) {\r\n      <span style=\"color:#794938\">$<\/span><span style=\"color:#693a17\">.getJSON<\/span>(<span style=\"color:#0b6125\">\"degrees.php\"<\/span>, { term : extractLast( request.term )},response);\r\n    }<span style=\"color:#794938\">else<\/span>{\r\n       <span style=\"color:#794938\">$<\/span><span style=\"color:#693a17\">.getJSON<\/span>(<span style=\"color:#0b6125\">\"skills.php\"<\/span>, { term : extractLast( request.term )},response);\r\n    }\r\n}\r\n<\/pre>\n<h2>Source Files<\/h2>\n<p>We can get the textbox value by term field (<code>$_GET['term']<\/code>) from the query string. We will fetch the data from <b>skills<\/b> or <b>degrees<\/b> table and filtering the skills or degrees by <code>$_GET['term']<\/code>. Filtered data would be returned as JSON format.<\/p>\n<p><b><code>skills.php<\/code>:<\/b><\/p>\n<pre><span style=\"color: #0000BB\">&lt;?php<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/database&nbsp;configuration<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbHost&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'localhost'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbUsername&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'root'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbPassword&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">''<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbName&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'codexworld'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/connect&nbsp;with&nbsp;the&nbsp;database<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$db&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;new&nbsp;<\/span><span style=\"color: #0000BB\">mysqli<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$dbHost<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbUsername<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbPassword<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbName<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/get&nbsp;search&nbsp;term<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$searchTerm&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$_GET<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'term'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/get&nbsp;matched&nbsp;data&nbsp;from&nbsp;skills&nbsp;table<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$query&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">query<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"SELECT&nbsp;*&nbsp;FROM&nbsp;skills&nbsp;WHERE&nbsp;name&nbsp;LIKE&nbsp;'%\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$searchTerm<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"%'&nbsp;ORDER&nbsp;BY&nbsp;name&nbsp;ASC\"<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(<\/span><span style=\"color: #0000BB\">$row&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">fetch_assoc<\/span><span style=\"color: #007700\">())&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">[]&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'name'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/return&nbsp;json&nbsp;data<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">json_encode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/pre>\n<p><b><code>degrees.php<\/code>:<\/b><\/p>\n<pre><span style=\"color: #0000BB\">&lt;?php<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/database&nbsp;configuration<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbHost&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'localhost'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbUsername&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'root'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbPassword&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">''<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$dbName&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'codexworld'<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/connect&nbsp;with&nbsp;the&nbsp;database<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$db&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;new&nbsp;<\/span><span style=\"color: #0000BB\">mysqli<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$dbHost<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbUsername<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbPassword<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$dbName<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/get&nbsp;search&nbsp;term<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$searchTerm&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$_GET<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'term'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/get&nbsp;matched&nbsp;data&nbsp;from&nbsp;skills&nbsp;table<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$query&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">query<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"SELECT&nbsp;*&nbsp;FROM&nbsp;degrees&nbsp;WHERE&nbsp;name&nbsp;LIKE&nbsp;'%\"<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$searchTerm<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">\"%'&nbsp;ORDER&nbsp;BY&nbsp;name&nbsp;ASC\"<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(<\/span><span style=\"color: #0000BB\">$row&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">fetch_assoc<\/span><span style=\"color: #007700\">())&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">[]&nbsp;=&nbsp;<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'name'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/return&nbsp;json&nbsp;data<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">json_encode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$data<\/span><span style=\"color: #007700\">);<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/pre>\n<h2>Conclusion<\/h2>\n<p>We&#8217;ve covered most required jQuery autocomplete functionalities. Using these functionalities, you can extend jQuery UI autocomplete and implement advanced autocomplete in your web project. If you know any other advanced functionality of jQuery UI autocomplete, you can share with us by commenting here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous jQuery UI Autocomplete tutorial, we have shown how to display auto-suggestions from the database under the textbox in PHP. But it was for single selection. In this tutorial, you&#8217;ll learn how to <\/p>\n","protected":false},"author":1,"featured_media":1237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[20,18,16,17,19,14],"class_list":["post-1235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","tag-autocomplete-search","tag-autocomplete-textbox","tag-jquery","tag-jquery-ui","tag-mysql","tag-php","cat-6-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld<\/title>\n<meta name=\"description\" content=\"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-01T18:56:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-22T16:27:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL\",\"datePublished\":\"2016-02-01T18:56:16+00:00\",\"dateModified\":\"2016-04-22T16:27:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/\"},\"wordCount\":440,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png\",\"keywords\":[\"Autocomplete Search\",\"Autocomplete Textbox\",\"jQuery\",\"jQuery UI\",\"MySQL\",\"PHP\"],\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/\",\"name\":\"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png\",\"datePublished\":\"2016-02-01T18:56:16+00:00\",\"dateModified\":\"2016-04-22T16:27:31+00:00\",\"description\":\"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/autocomplete-textbox-multiple-values-jquery-php-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld","description":"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/","og_locale":"en_US","og_type":"article","og_title":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld","og_description":"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.","og_url":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2016-02-01T18:56:16+00:00","article_modified_time":"2016-04-22T16:27:31+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL","datePublished":"2016-02-01T18:56:16+00:00","dateModified":"2016-04-22T16:27:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/"},"wordCount":440,"commentCount":5,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","keywords":["Autocomplete Search","Autocomplete Textbox","jQuery","jQuery UI","MySQL","PHP"],"articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/","url":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/","name":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","datePublished":"2016-02-01T18:56:16+00:00","dateModified":"2016-04-22T16:27:31+00:00","description":"Autocomplete textbox with multiple values in PHP - Learn how to implement autocomplete textbox with multiple values using jQuery, PHP and MySQL.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","width":1366,"height":768,"caption":"autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/autocomplete-textbox-multiple-values-jquery-php-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Autocomplete Textbox with Multiple Values using jQuery, PHP and MySQL"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/02\/autocomplete-textbox-with-multiple-values-using-jquery-php-mysql-by-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-jV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=1235"}],"version-history":[{"count":5,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1235\/revisions"}],"predecessor-version":[{"id":1241,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1235\/revisions\/1241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/1237"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=1235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=1235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=1235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}