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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:36:31+00:00 2026-06-02T03:36:31+00:00

I have a variable of array containing such as these names ; // Listing

  • 0

I have a variable of array containing such as these names;

// Listing ENTITIES
$entitiesTable = array(
    1 => "user",
    2 => "group",
    3 => "customer",
    4 => "supplier",
    5 => "terminal",
    6 => "order",
    7 => "invoice",
    8 => "invoice detail",
    9 => "invoice offer",
    10 => "invoice offer detail",
    11 => "quotation",
    12 => "quotation detail",
    13 => "quotation offer",
    14 => "quotation offer detail",
    15 => "purchase order",
    16 => "purchase order detail",
    17 => "purchase order request",
    18 => "purchase order request detail",
    19 => "sales order",
    20 => "sales order detail",
    21 => "delivery order",
    22 => "delivery order detail",
    23 => "sales return",
    24 => "sales return detail",
    25 => "purchase return",
    26 => "purchase return detail",
    27 => "item",
    28 => "category",
    29 => "unit measurement",
    30 => "last activity",
    31 => "rack",
    32 => "alert",
    33 => "filter",
    34 => "prefix code",
    35 => "system",
    36 => "company profile"
); 

And at the middle of my php body, i create For Loops. Iterating the array, and then echoing em out.

foreach ($entitiesTable as $singleEntity){
if(preg_match($regexUsed, $singleEntity)){
    $pluralEntity = preg_replace($regexUsed, 'ies', $singleEntity);
} else {
    $pluralEntity = $singleEntity . 's';    
}

// Replacing spaces with a dash character and capitalize the first word
$pluralEntityWOSpace = ucwords($pluralEntity);
$pluralEntityWOSpace = str_ireplace(" ","" , $pluralEntityWOSpace);

$pluralEntityWDash = str_ireplace(" ","-" , $pluralEntity);

$singleEntityWOSpace = ucwords($singleEntity);
$singleEntityWOSpace = str_ireplace(" ","" , $singleEntityWOSpace);

echo $singleEntityWOSpace . '<br/>';
}

Somehow, I just realized it right now, that What i obtained is NOT A WHOLE NAME as it’s listed earlier from the array. Instead, What I got now is just a small piece of those names. Look!
Here are the output names I obtained:

User
Group
Customer
Supplier
Terminal
Order
Invoice
InvoiceDetail
InvoiceOffer
InvoiceOfferDetail
Quotation
QuotationDetail
QuotationOffer
QuotationOfferDetail
PurchaseOrder
PurchaseOrderDetail
PurchaseOrderRequest
PurchaseOrderRequestDetail
SalesOrder
SalesOrderDetail
DeliveryOrder
DeliveryOrderDetail
SalesReturn
SalesReturnDetail
PurchaseReturn
PurchaseReturnDetail
Item
Category
UnitMeasurement
LastActivit

I tried to write FLUSH() at the end of my php script, and the output of those names are OK. But then it gives me another error, since I’m using Slim Framework.
Is there another alternatives way rather than using FLUSH()?

  • 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-02T03:36:33+00:00Added an answer on June 2, 2026 at 3:36 am

    The real quick answer for this is, by modifing the php.ini file;

    output_buffering = 4096
    implicit_flush = Off
    

    And then restarting the APache server. I dunno why but it works.

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

Sidebar

Related Questions

I have an array containing a Variable amount of results/entries. I use foreach as
Let's say I have a C# variable and array: int variable_1 = 1; int[3]
I have a variable that contains : Sometimes array of strings and sometimes array
I have a variable that contains an array from form data, seen below: $option1
I have a variable declared like this in a class: Entity *array[BOARD_SIZE][BOARD_SIZE]; I need
I have an array and variable. If the variable does not exist in the
I have a array with a variable amount of values. Is there a more
I have an array stored in a variable temp which looks like this: temp.inspect
I have a certain session variable that is actually an array. I want to
I have an associative array assigned to a Smarty variable, something like this: $foo

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.