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

  • Home
  • SEARCH
  • 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 8032783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:29:44+00:00 2026-06-05T01:29:44+00:00

i am using $front->getRequest()->getParams() to get the url params. They look like this Zend_Debug::dump($front->getRequest()->getParams());

  • 0

i am using $front->getRequest()->getParams() to get the url params. They look like this

Zend_Debug::dump($front->getRequest()->getParams());

array(4) {
  ["id"] => string(7) "3532231"
  ["module"] => string(7) "test"
  ["controller"] => string(6) "index"
  ["action"] => string(5) "index"
}

i am interested in running this through preg_match_all to get back only the id numbers by using some regexp similar to ([\s0-9])+

for some reason i cant isolate that number.

There is the possibility that there will be more id like values in the array, but the preg_match_all should give them back to me in a new array

any ideas?

thanks

  • 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-05T01:29:46+00:00Added an answer on June 5, 2026 at 1:29 am

    array_filter() is the way to go here.

    $array = array_filter($array, function($value) {
        return preg_match('/^[0-9]+$/',$value);
    });
    

    You might also want to replace the preg_match() with is_numeric() for performance.

    $array = array_filter($array, function($value) {
        return is_numeric($value);
    });
    

    That should give the same results.

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

Sidebar

Related Questions

We're using jetty as front end http server, with cache policies. I would like
I'm using several response segments which I push on my action stack like this:
I'm making a small PHP MVC framework for fun. I'm using a front controller
I'm trying to test my backbone front-end using Jasmine against our back-end API. Our
I have built an ERP for a small company using MS-Access (front end) and
I work on an internal corporate system that has a web front-end using Tomcat.
I'm using an MS Access 2003 front end to access the data on a
I'm using JSP tags to encapsulate reusable front-end logic. I can successfully pass a
If your using a mix of jQuery and Ajax to manage the front-end of
I am using nested Asynchronous callbacks to save my front-end data to the back-end

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.