How To Guides on Programming and Web Development - CodexWorld https://www.codexworld.com/how-to/ Web & Mobile App Development Company Mon, 23 Jun 2025 07:06:41 +0000 en-US hourly 1 https://www.codexworld.com/wp-content/uploads/2020/04/favicon.ico How To Guides on Programming and Web Development - CodexWorld https://www.codexworld.com/how-to/ 32 32 91409221 How to check if a string contains specific words in PHP https://www.codexworld.com/how-to/check-if-a-string-contains-specific-words-in-php/ https://www.codexworld.com/how-to/check-if-a-string-contains-specific-words-in-php/#respond Mon, 23 Jun 2025 07:05:32 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5803 There are multiple ways to check if a string contains any words from the given array using PHP. You can check one specific word or multiple words from an array. Use the PHP str_contains() function to determine if a string contains a specific word. If you want to check multiple words in a string, define words in an array.

The post How to check if a string contains specific words in PHP appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/check-if-a-string-contains-specific-words-in-php/feed/ 0 5803
How to install PostgreSQL server on Windows https://www.codexworld.com/how-to/install-postgresql-server-on-windows/ https://www.codexworld.com/how-to/install-postgresql-server-on-windows/#respond Thu, 25 Jul 2024 07:19:26 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5692 Download the installer and install the PostgreSQL server on Windows. Once the PostgreSQL installer installation is completed, you can connect the database from your local computer. Connect to the PostgreSQL database using SQL Shell (psql) or pgAdmin 4. Use Query Tool to write and execute SQL queries on PostgreSQL database.

The post How to install PostgreSQL server on Windows appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/install-postgresql-server-on-windows/feed/ 0 5692
How to convert timestamp to time ago format in PHP https://www.codexworld.com/how-to/convert-timestamp-to-time-ago-format-in-php/ https://www.codexworld.com/how-to/convert-timestamp-to-time-ago-format-in-php/#respond Tue, 18 Jun 2024 12:21:08 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5648 Time Ago format is used to display time in human-readable format, such as 5 seconds ago, 2 minutes ago, 1 day ago, etc. Relative time format helps to avoid different time zone conversions. In this example code snippet, we will show you how to create Time Ago function to convert timestamp to time ago using PHP.

The post How to convert timestamp to time ago format in PHP appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/convert-timestamp-to-time-ago-format-in-php/feed/ 0 5648
How to Hide an Alert Message After a Specific Time (5 seconds) using JavaScript? https://www.codexworld.com/how-to/hide-an-alert-message-after-a-specific-time-5-seconds-using-javascript/ https://www.codexworld.com/how-to/hide-an-alert-message-after-a-specific-time-5-seconds-using-javascript/#respond Wed, 01 May 2024 04:55:16 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5606 Hide alert message automatically after some time is a great feature to make web form UI user-friendly. With the auto-hide feature, the alert message element closes automatically after some specific time and disappears from the web page. Use the setTimeout() method to hide the HTML element after some time from the web page.

The post How to Hide an Alert Message After a Specific Time (5 seconds) using JavaScript? appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/hide-an-alert-message-after-a-specific-time-5-seconds-using-javascript/feed/ 0 5606
How to Add Full Screen Control to OpenStreetMap using JavaScript https://www.codexworld.com/how-to/add-full-screen-control-to-openstreetmap-using-javascript/ https://www.codexworld.com/how-to/add-full-screen-control-to-openstreetmap-using-javascript/#respond Fri, 29 Mar 2024 06:30:46 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5590 Full Screen Control feature helps to view maps in full-screen mode. The full-screen control button is placed at the corner of the map, it allows you to go full-screen or exit full-screen. There are some third-party plugins available to extend OpenStreetMap functionality with Leaflet. Use the leaflet.fullscreen plugin to add full screen control in OpenStreetMap with Leaflet using JavaScript.

The post How to Add Full Screen Control to OpenStreetMap using JavaScript appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/add-full-screen-control-to-openstreetmap-using-javascript/feed/ 0 5590
How to Customize the OpenStreetMap Marker Icon using JavaScript https://www.codexworld.com/how-to/customize-open-street-map-marker-icon-using-javascript/ https://www.codexworld.com/how-to/customize-open-street-map-marker-icon-using-javascript/#respond Tue, 26 Mar 2024 06:43:10 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5586 Open Street Map provides a marker icon by default. You can change the default marker icon image and customize the icon size in OpenStreetMap. Customizing the marker icon helps to match the OpenStreetMap with the website UI. This guide will show you how to customize the OpenStreetMap marker icon using JavaScript.

The post How to Customize the OpenStreetMap Marker Icon using JavaScript appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/customize-open-street-map-marker-icon-using-javascript/feed/ 0 5586
How to JOIN Multiple Tables in DataTables Server-side Processing using PHP https://www.codexworld.com/how-to/join-multiple-tables-in-datatables-server-side-processing-using-php/ https://www.codexworld.com/how-to/join-multiple-tables-in-datatables-server-side-processing-using-php/#comments Sat, 09 Mar 2024 04:29:51 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5573 DataTables server-side processing is used to fetch data from the database and list them in a tabular view. In most cases, the single database table is used in DataTables with server-side processing. The SSP class gives you the possibility to JOIN multiple tables with DataTables server-side processing. You can apply the LEFT or INNER JOIN clause to the SQL query in server-side processing.

The post How to JOIN Multiple Tables in DataTables Server-side Processing using PHP appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/join-multiple-tables-in-datatables-server-side-processing-using-php/feed/ 1 5573
How to get file content from URL in PHP https://www.codexworld.com/how-to/get-file-content-from-url-in-php/ https://www.codexworld.com/how-to/get-file-content-from-url-in-php/#respond Tue, 31 Oct 2023 05:57:37 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5517 There are various options available to get the content from the URL in PHP. You can get the file content from a remote URL using PHP. PHP file_get_contents() function is the easiest way to parse the content from a web URL. To use the file_get_contents() function, the allow_url_fopen directive must be enabled in the PHP configuration file (php.ini).

The post How to get file content from URL in PHP appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/get-file-content-from-url-in-php/feed/ 0 5517
How to avoid javascript:void(0) and use an alternative in empty href links? https://www.codexworld.com/how-to/avoid-javascript-void-0-and-use-an-alternative-in-empty-href-links/ https://www.codexworld.com/how-to/avoid-javascript-void-0-and-use-an-alternative-in-empty-href-links/#respond Wed, 25 Oct 2023 05:56:58 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5515 The javascript:void(0); attribute is used in the anchor tag for empty links. It helps to prevent the default behavior of href links. But, JavaScript Void 0 may not work well for some JS frameworks (Angular, Backbone.js, etc) and SPA sites. Also, the content security policy (CSP) does not support javascript:void(0) in the application. Use the "#!" in the href attribute of the <a> tag for empty links.

The post How to avoid javascript:void(0) and use an alternative in empty href links? appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/avoid-javascript-void-0-and-use-an-alternative-in-empty-href-links/feed/ 0 5515
How to get Current DateTime by given a Timezone in PHP https://www.codexworld.com/how-to/get-current-datetime-by-given-a-timezone-in-php/ https://www.codexworld.com/how-to/get-current-datetime-by-given-a-timezone-in-php/#respond Mon, 02 Oct 2023 05:36:52 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=5493 In general, we use the date() function to get date and time in PHP. It returns the time based on the timezone set in the PHP server. You can get the DateTime from the timezone set as default on the PHP configuration. In this example code, we will show you how to get the current time by given a timezone in PHP. You can get and display the current Date and Time from a specific timezone using PHP.

The post How to get Current DateTime by given a Timezone in PHP appeared first on CodexWorld.

]]>
https://www.codexworld.com/how-to/get-current-datetime-by-given-a-timezone-in-php/feed/ 0 5493