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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:35:52+00:00 2026-06-04T13:35:52+00:00

Please take a look at the content of this variable: $profile_rule = ‘profile LIKE

  • 0

Please take a look at the content of this variable:

$profile_rule = 'profile LIKE (\'fitness\') AND profile LIKE (\'pets\')';

Is there a way to strip all the text inside and just get the words fitness and pets into two separate variables?

$var1 = 'fitness';
$var2 = 'pets';

I’m not sure this could be done, but if there’s a way it will save me allot of work.

Thank you!

  • 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-04T13:35:53+00:00Added an answer on June 4, 2026 at 1:35 pm
    $profile_rule = 'profile LIKE (\'fitness\') AND profile LIKE (\'pets\')';
    
    preg_match_all('/\'(.*?)\'/',$profile_rule,$match);
    
    print_r($match[1]);
    
    // Outputs: Array ( [0] => fitness [1] => pets )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please take a look at this screenshot first: I would like to move the
Please take a look at this example: #include <iostream> #include <vector> #include <string> using
Please take a look at this code: template<class T> class A { class base
Please take a look at this page: http://www.carteadenisip.ro/partener/id-753.html - the image is not showing
Please take a look at this link , then click on the bottom in
Please take a look at the following line <TextBox Text="{Binding Price}"/> This Price property
please take a look of this, the file demo.php is an example of the
Please take a look at this XML code: <TableLayout android:id=@+id/tableLayout1 android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dip android:isScrollContainer=true
THis is myDB Class //Please take a look at public Cursor getplaces() --- Am
Please take a look at this page : clicking on the orange cart badge

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.