{"id":377,"date":"2026-08-20T14:33:19","date_gmt":"2026-08-20T18:33:19","guid":{"rendered":"https:\/\/www.techronology.com\/main\/blog\/?p=377"},"modified":"2026-08-20T14:39:37","modified_gmt":"2026-08-20T18:39:37","slug":"create-random-titles-and-meta-descriptions-using-php","status":"publish","type":"post","link":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/","title":{"rendered":"Create Random Titles and Meta Descriptions using PHP"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"400\" src=\"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png\" alt=\"Create Random Titles and Meta Descriptions using PHP - Techronology\" class=\"wp-image-391\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The code listing in this post shows you how to use <a href=\"https:\/\/www.php.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP<\/a> to create random titles and <a href=\"https:\/\/moz.com\/learn\/seo\/meta-description\" target=\"_blank\" rel=\"noreferrer noopener\">meta desciptions<\/a>. So, when someone visits your site, they may get a different <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/title\" target=\"_blank\" rel=\"noreferrer noopener\">title<\/a>, meta description, or <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn_web_development\/Core\/Structuring_content\/Headings_and_paragraphs\" target=\"_blank\" rel=\"noreferrer noopener\">heading text<\/a>. It all depends on how many values you assign. The more values, the better chance the user or bots will see something different.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Code listing to create random titles<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n    \/\/ Create descriptions to randomize for meta tag\n    $pgDesc&#91;0&#93;      = 'Random meta description 1';\n    $pgDesc&#91;1&#93;      = 'Random meta description 2';\n    $pgDesc&#91;2&#93;      = 'Random meta description 3';\n    $pgDesc&#91;3&#93;      = 'Random meta description 4';\n    $pgDesc&#91;4&#93;      = 'Random meta description 5';\n    $pgDesc         = $pgDesc&#91;rand(0,count($pgDesc)-1)&#93;;        \/\/ No need to update this row\n\n    \/\/ Create titles to randomize for title tag\n    $pgTitle&#91;0&#93;     = 'Random title 1';\n    $pgTitle&#91;1&#93;     = 'Random title 2';\n    $pgTitle&#91;2&#93;     = 'Random title 3';\n    $pgTitle&#91;3&#93;     = 'Random title 4';\n    $pgTitle&#91;4&#93;     = 'Random title 5';\n    $pgTitle        = $pgTitle&#91;rand(0,count($pgTitle)-1)&#93;;      \/\/ No need to update this row   \n\n    \/\/ Create header titles to randomize for opening H1 tag\n    $pgHead&#91;0&#93;      = 'Random header title 1';\n    $pgHead&#91;1&#93;      = 'Random header title 2';\n    $pgHead&#91;2&#93;      = 'Random header title 3';\n    $pgHead&#91;3&#93;      = 'Random header title 4';\n    $pgHead&#91;4&#93;      = 'Random header title 5';\n    $pgHead         = $pgHead&#91;rand(0,count($pgHead)-1)&#93;;        \/\/ No need to update this row  \n?>\n&lt;!DOCTYPE html>\n&lt;html lang=\"en\">\n&lt;head>\n    &lt;meta charset=\"UTF-8\" \/>\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n    &lt;meta name=\"description\" content=\"&lt;?php echo $pgDesc; ?>\" \/>\n\n    &lt;title>&lt;?php echo $pgTitle; ?>&lt;\/title>\n&lt;\/head>\n&lt;body>\n    &lt;h1>&lt;?php echo $pgHead; ?>&lt;\/h1>\n&lt;\/body>\n&lt;\/html><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">&lt;?<\/span><span style=\"color: #D8DEE9FF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">    <\/span><span style=\"color: #616E88\">\/\/ Create descriptions to randomize for meta tag<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random meta description 1<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random meta description 2<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random meta description 3<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">3<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random meta description 4<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">4<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random meta description 5<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #88C0D0\">rand<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\">count<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">)&#93;<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\">\/\/ No need to update this row<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">    <\/span><span style=\"color: #616E88\">\/\/ Create titles to randomize for title tag<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random title 1<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random title 2<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random title 3<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">3<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random title 4<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">4<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random title 5<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #88C0D0\">rand<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\">count<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">)&#93;<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #616E88\">\/\/ No need to update this row   <\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">    <\/span><span style=\"color: #616E88\">\/\/ Create header titles to randomize for opening H1 tag<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random header title 1<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random header title 2<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random header title 3<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">3<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random header title 4<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #B48EAD\">4<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\">      <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Random header title 5<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #D8DEE9FF\">         <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #88C0D0\">rand<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\">count<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">)&#93;<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\">\/\/ No need to update this row  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;!<\/span><span style=\"color: #D8DEE9FF\">DOCTYPE html<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">html lang<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">en<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">head<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">meta charset<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">UTF-8<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">meta name<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">viewport<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> content<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">width=device-width, initial-scale=1.0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">meta name<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> content<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">&lt;?php echo <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgDesc<\/span><span style=\"color: #A3BE8C\">; ?&gt;<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">title<\/span><span style=\"color: #81A1C1\">&gt;&lt;?<\/span><span style=\"color: #D8DEE9FF\">php <\/span><span style=\"color: #81A1C1\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgTitle<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">?&gt;&lt;\/<\/span><span style=\"color: #D8DEE9FF\">title<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/<\/span><span style=\"color: #D8DEE9FF\">head<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">body<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9FF\">h1<\/span><span style=\"color: #81A1C1\">&gt;&lt;?<\/span><span style=\"color: #D8DEE9FF\">php <\/span><span style=\"color: #81A1C1\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">pgHead<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">?&gt;&lt;\/<\/span><span style=\"color: #D8DEE9FF\">h1<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/<\/span><span style=\"color: #D8DEE9FF\">body<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/<\/span><span style=\"color: #D8DEE9FF\">html<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">So, the main PHP starts at the top, from lines 1 to 25. That is where we want initiate the variables to use in the program. Also, in lines 8, 16, and 24, we randomly populate a variable from an array. There is no need to edit these rows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, we are able to keep the same name as the arrays for all three variables.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">How the code looks on website<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Once render, this is how it looks over the web.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"603\" height=\"351\" src=\"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-2.png\" alt=\"Create Random Titles and Meta Descriptions using PHP - Techronology\" class=\"wp-image-384\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And, here is the view-source code. As you see, no visible PHP.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"603\" height=\"351\" src=\"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-1.png\" alt=\"Create Random Titles and Meta Descriptions using PHP - Techronology\" class=\"wp-image-383\"\/><\/figure>\n\n\n\n<p class=\"fw-semibold wp-block-paragraph\">Selectable rendered code<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to not seeing the PHP code, notice how your information is cleanly populated in the tag. As a result, you have a bunch of possibilities to work with.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;!DOCTYPE html>\n&lt;html lang=\"en\">\n&lt;head>\n    &lt;meta charset=\"UTF-8\" \/>\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n    &lt;meta name=\"description\" content=\"Random meta description 1\" \/>\n\n    &lt;title>Random title 2&lt;\/title>\n&lt;\/head>\n&lt;body>\n    &lt;h1>Random header title 1&lt;\/h1>\n&lt;\/body>\n&lt;\/html><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">&lt;!DOCTYPE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">html<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;html<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">lang<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">en<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #81A1C1\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;head&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;meta<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">charset<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">UTF-8<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;meta<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">name<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">viewport<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">content<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">width=device-width, initial-scale=1.0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;meta<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">name<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">description<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">content<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Random meta description 1<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/&gt;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;title&gt;<\/span><span style=\"color: #D8DEE9FF\">Random title 2<\/span><span style=\"color: #81A1C1\">&lt;\/title&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/head&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;body&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">&lt;h1&gt;<\/span><span style=\"color: #D8DEE9FF\">Random header title 1<\/span><span style=\"color: #81A1C1\">&lt;\/h1&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/body&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;\/html&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Final tip<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Overall, you can use this method for different sections of the website. Or, you can customize it based on user selections, etc.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Related<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.techronology.com\/main\/blog\/the-graphics-power-diskette-1996-demo\/\">The Graphics Power Diskette (1996 Demo)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.techronology.com\/main\/blog\/time-delay-code-in-visual-basic-for-applications\/\">Time Delay Code in Visual Basic for Applications<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview The code listing in this post shows you how to use PHP to create random titles and meta desciptions. So, when someone visits your site, they may get a different title, meta description, or heading text. It all depends on how many values you assign. The more values, the better chance the user or &hellip;<\/p>\n","protected":false},"author":2,"featured_media":391,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3,13],"tags":[4,24],"class_list":["post-377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","category-reference","tag-php","tag-webdev"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Random Titles and Meta Descriptions using PHP - Techronology blog<\/title>\n<meta name=\"description\" content=\"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology\" \/>\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.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Random Titles and Meta Descriptions using PHP - Techronology blog\" \/>\n<meta property=\"og:description\" content=\"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Techronology blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/realtechronology\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-20T18:33:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-20T18:39:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Techronology\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@techronology\" \/>\n<meta name=\"twitter:site\" content=\"@techronology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Techronology\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/\"},\"author\":{\"name\":\"Techronology\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#\\\/schema\\\/person\\\/5eaa3244f77fd3a4d69d4843761efa1f\"},\"headline\":\"Create Random Titles and Meta Descriptions using PHP\",\"datePublished\":\"2026-08-20T18:33:19+00:00\",\"dateModified\":\"2026-08-20T18:39:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/\"},\"wordCount\":233,\"publisher\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/random-title-php-featimg-1.png\",\"keywords\":[\"PHP\",\"WebDev\"],\"articleSection\":[\"Coding\",\"Reference\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/\",\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/\",\"name\":\"Create Random Titles and Meta Descriptions using PHP - Techronology blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/random-title-php-featimg-1.png\",\"datePublished\":\"2026-08-20T18:33:19+00:00\",\"dateModified\":\"2026-08-20T18:39:37+00:00\",\"description\":\"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/random-title-php-featimg-1.png\",\"contentUrl\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/random-title-php-featimg-1.png\",\"width\":600,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/create-random-titles-and-meta-descriptions-using-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Random Titles and Meta Descriptions using PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/\",\"name\":\"Techronology blog\",\"description\":\"We love creating software tools, online apps, and games\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#organization\"},\"alternateName\":\"Techronology\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#organization\",\"name\":\"Techronology\",\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/techronology-icon.png\",\"contentUrl\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/techronology-icon.png\",\"width\":600,\"height\":600,\"caption\":\"Techronology\"},\"image\":{\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/realtechronology\",\"https:\\\/\\\/x.com\\\/techronology\",\"https:\\\/\\\/www.instagram.com\\\/techronology\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/#\\\/schema\\\/person\\\/5eaa3244f77fd3a4d69d4843761efa1f\",\"name\":\"Techronology\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g\",\"caption\":\"Techronology\"},\"sameAs\":[\"https:\\\/\\\/www.techronology.com\"],\"url\":\"https:\\\/\\\/www.techronology.com\\\/main\\\/blog\\\/author\\\/techronology\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Random Titles and Meta Descriptions using PHP - Techronology blog","description":"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology","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.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/","og_locale":"en_US","og_type":"article","og_title":"Create Random Titles and Meta Descriptions using PHP - Techronology blog","og_description":"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology","og_url":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/","og_site_name":"Techronology blog","article_publisher":"https:\/\/www.facebook.com\/realtechronology","article_published_time":"2026-08-20T18:33:19+00:00","article_modified_time":"2026-08-20T18:39:37+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","type":"image\/png"}],"author":"Techronology","twitter_card":"summary_large_image","twitter_creator":"@techronology","twitter_site":"@techronology","twitter_misc":{"Written by":"Techronology","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#article","isPartOf":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/"},"author":{"name":"Techronology","@id":"https:\/\/www.techronology.com\/main\/blog\/#\/schema\/person\/5eaa3244f77fd3a4d69d4843761efa1f"},"headline":"Create Random Titles and Meta Descriptions using PHP","datePublished":"2026-08-20T18:33:19+00:00","dateModified":"2026-08-20T18:39:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/"},"wordCount":233,"publisher":{"@id":"https:\/\/www.techronology.com\/main\/blog\/#organization"},"image":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","keywords":["PHP","WebDev"],"articleSection":["Coding","Reference"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/","url":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/","name":"Create Random Titles and Meta Descriptions using PHP - Techronology blog","isPartOf":{"@id":"https:\/\/www.techronology.com\/main\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","datePublished":"2026-08-20T18:33:19+00:00","dateModified":"2026-08-20T18:39:37+00:00","description":"Create Random Titles and Meta Descriptions using PHP - Show users and bots something different when they visit your website Techronology","breadcrumb":{"@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#primaryimage","url":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","contentUrl":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","width":600,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.techronology.com\/main\/blog\/create-random-titles-and-meta-descriptions-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techronology.com\/main\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Random Titles and Meta Descriptions using PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.techronology.com\/main\/blog\/#website","url":"https:\/\/www.techronology.com\/main\/blog\/","name":"Techronology blog","description":"We love creating software tools, online apps, and games","publisher":{"@id":"https:\/\/www.techronology.com\/main\/blog\/#organization"},"alternateName":"Techronology","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techronology.com\/main\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/www.techronology.com\/main\/blog\/#organization","name":"Techronology","url":"https:\/\/www.techronology.com\/main\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.techronology.com\/main\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/techronology-icon.png","contentUrl":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/techronology-icon.png","width":600,"height":600,"caption":"Techronology"},"image":{"@id":"https:\/\/www.techronology.com\/main\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/realtechronology","https:\/\/x.com\/techronology","https:\/\/www.instagram.com\/techronology"]},{"@type":"Person","@id":"https:\/\/www.techronology.com\/main\/blog\/#\/schema\/person\/5eaa3244f77fd3a4d69d4843761efa1f","name":"Techronology","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/secure.gravatar.com\/avatar\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/373ff4538d504e15cde503e42767bbaf7d8ded3ee8c436f226892b80d7f61d05?s=96&d=mm&r=g","caption":"Techronology"},"sameAs":["https:\/\/www.techronology.com"],"url":"https:\/\/www.techronology.com\/main\/blog\/author\/techronology\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.techronology.com\/main\/blog\/wp-content\/uploads\/2026\/08\/random-title-php-featimg-1.png","_links":{"self":[{"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":19,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":402,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/posts\/377\/revisions\/402"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/media\/391"}],"wp:attachment":[{"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techronology.com\/main\/blog\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}