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 7959045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:30:43+00:00 2026-06-04T04:30:43+00:00

I have a problem, first off, I have a variable $num_newlines that changes to

  • 0

I have a problem, first off, I have a variable $num_newlines that changes to the amount of lines a files has. Then what I want to do is duplicate a line to one less than what $num_newlines equals. The line is:

$tweetcpitems->post('statuses/update', array('status' => wordFilter("The item $array[1] has been released on Club Penguin.")));

What I want to do next is that for each duplicate line I want the array number to change, for example:

$tweetcpitems->post('statuses/update', array('status' => wordFilter("The item *$array[1]* has been released on Club Penguin.")));

Then the second line to be like:

$tweetcpitems->post('statuses/update', array('status' => wordFilter("The item *$array[2]* has been released on Club Penguin.")));

Then the third line to have $array[3] and so on. The main problem is that I don’t want to have to manually add the lines of code and change the numbers because the variable $num_newlines is always changing. Any help would be HIGHLY appreciated as I’ve kept on researching on how to do this, but found nothing.

  • 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-04T04:30:44+00:00Added an answer on June 4, 2026 at 4:30 am
    for ($i=0; $i<($numlines - 1); $i++) {
        $tweetcpitems->post('statuses/update', array('status' => wordFilter("The item $array[$i] has been released on Club Penguin.")));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem but first i want to know if im working on
I have a problem with a sheet that when opened for the first time,
I have an application that has been working with session variables no problem. I
First off, I'm using Access 2000 and DAO. I have code that executes a
I have successfully made a script that filters out duplicate lines in a file
I have a problem with selecting not first selector using attributeContains jQuery('div[id*=abc]:not(:first)').hide();
i have a problem with triggering the multiple alarm at first time , here
I have a problem at hand, at first sight it looks easy and it
I have a problem with my application. First of all on a previous page
I have a problem with this script. At first I had the <div> s

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.