Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:21:38+00:00 2026-06-17T11:21:38+00:00

The following script prints the strings from the array named arr . After an

  • 0

The following script prints the strings from the array named arr. After an echo from arr I try to insert a line break using \n but I don’t see it. Why is that ?

<?php
$arr = array("ghazal","shayari","silence","hayaat");
echo $arr[0];
echo $arr[1];
foreach($arr as $var) {
  echo $var;
  echo "\n";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:21:40+00:00Added an answer on June 17, 2026 at 11:21 am

    HTML treats all whitespace characters, in any number, identically.

    That is, the following will all render as a single space in the browser:

    echo "\n";
    echo "\t";
    echo "         ";
    echo "  \n\n\n  ";
    

    In order to render an actual linkbreak in HTML, you need to insert a <br> element into your document.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following script i am using to scrap data from my uni
I'm try to insert values into my sqlite table using a python script. It
I have a CGI script that prints the following on stdout: print Status: 302
This popup prevent other scripts from running and prints the following: instruments[2596] : kCGErrorInvalidConnection:
The following snippet is from a little app I wrote using the Qt framework.
The following is the script for finding consecutive substrings in strings. use strict; use
I have the following script defining a tzinfo object: import time from datetime import
I have the following python script to encrypt/decrypt data using AES 256, could you
I am returning strings from a python module, for consumption within a bash script.
I am writing a webpage that involves using a php array of strings to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.