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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:25:03+00:00 2026-05-31T00:25:03+00:00

i need to fetch data from the following strings and need to place their

  • 0

i need to fetch data from the following strings and need to place their values according to their type

1)
Response: Success Message: Mailbox Message Count Mailbox: 6000 UrgMessages: 0 NewMessages: 5 OldMessages: 12

Required Output: example OLD= 12 NEW=5 URGENT=0

2)
Name : 6000
Secret :
MD5Secret :
Context : DLPN_Admin
Language :
AMA flags : Unknown
Transfer mode: open
MaxCallBR : 384 kbps
CallingPres : Presentation Allowed, Not Screened
Call limit : 2147483647
Callgroup : 1
Pickupgroup : 1
Callerid : “Arham Ali” <6000>
ACL : No
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Sess-Min-SE : 90 secs
Codec Order : (ulaw:20,gsm:20)
Auto-Framing: No

Required Output: CallerId=”Arham Ali” Name= “6000”

I am very much stuck with this stupid thing for so long please help me in PHP domain.

  • 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-05-31T00:25:04+00:00Added an answer on May 31, 2026 at 12:25 am

    If you need a bit more incase the message string is not always the same you could do this

    $string = ' Response: Success Message: Mailbox Message Count Mailbox: 6000 UrgMessages: 0 NewMessages: 5 OldMessages: 12';
    
    
    preg_match('/OldMessages: (\d+)*/', $string, $oldMessages);
    preg_match('/NewMessages: (\d+)*/', $string, $newMessages);
    preg_match('/UrgMessages: (\d+)*/', $string, $urgent);
    preg_match('/Mailbox: (\d+)*/', $string, $currentMailboxCount);
    
    print 'OLD= '.$oldMessages[1].' NEW='.$newMessages[1].' URGENT='.$urgent[1];
    

    This is all using regex. preg_match

    The same methods would apply for the second half of your question.

    A good tool to play with regex is http://gskinner.com/RegExr/

    Hoep this helps you out!

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

Sidebar

Related Questions

I have the following Query and i need the query to fetch data from
Im using vb.net and I need to fetch data from two different tables and
What do I do, I need to fetch data from 3 tables in mysql,
I have Core Data setup in my app and need to fetch a bunch
The following query returns data right away: SELECT time, value from data order by
I need to fetch HTML from Turkish webpages using Java. However, I am finding
I'm using this php to fetch data from my mysql database: $wpdb->get_var(select count(*) from
I need to access some data from an MS Access database and retrieve some
I am pulling some data from a mysql table via the following: $result =
Can this ever make sense? Say I need to fetch an object from the

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.