$file_name = "text1_text2-10212-etc_125.jpg";
$result = preg_replace("/[\-_]/", " ", $file_name);
ECHO $result;
OUTPUT
text1 text2 10212 etc 125.jpg
Related Posts:
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- Adding regex filter to feedwordpress
- When unit testing a plugin, does the plugin need to be in the wp-content/plugins directory of the WordPress tests install?
- How can I prevent a plugin from updating unless it’s minimum PHP version is met?
- Simple form that saves to database
- How to call plugin path in JS?
- Get Current user email as a return string value
- How can I make content disappear when a user logs in?
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- How Restrict access to admin dashboard by specific static ip?
- New Plugin: Post update pushes a copy as a revision
- Overide a function that is inside a plugin
- How to get images from EDD post?
- How to install and activate a plugin via an external PHP script
- How to remove xmlns on language_attributes()?
- How to initialize something in unit test before the init hook being called?
- Open Post Thumbnail in New Child Theme File in WordPress
- Add keywords meta to index.php page
- Download any file after submitting a form [closed]
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Executing my function once on a specific time
- Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
- Add a CSS class based on categroy id to archive pages
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Access WordPress data from external PHP application.
- Why “Call to a member function on a non-object” in plugin only?
- What are the specifics of WordPress development I need to know? [closed]
- After upgrade to php 7 plugin/them updates broke [closed]
- How to echo text in browser instead of download junk file?
- How to create a custom post type that contains another custom post type?
- WP Query. Is there a maximum size?
- WP Plugins – Use includes to display page content
- Issue running db create table query from static method
- Can i add custom code in Source, Header from function.php?
- How to make multiple admin pages for one plugin?
- Problem with isset and $_POST
- Allowing users to Sign-up > Login > Post articles that need approval
- Use $variable from file1.php in file2.php (different file paths)
- Redeclare function after plugin activation
- get_edit_post_link() not working on wp-cron
- Woocommerce Backend Search by Title and SKU
- Control page content visibility based on URL parameter
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- Adding a simple Javascript file with a plugin
- How to add/change (woocommerce) product tab icon
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- How to write to a separate PHP file in plugin settings
- Trying to make a simple wordpress plugin, having difficulties understanding how to make it?
- wordpress plugin license issue -New plugin development
- Dynamic Image Replacement through call rail phone call tracking plugins in wordpress
- How can I show registration form inside modal?
- More gentle way to hook WordPress custom url
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- How to proper escape echo inside a javascript tag
- Checkbox show / hide output result
- Custom Logo Link WordPress
- How to convert Currency from USD to other IP Based currency in Php function
- How do I reinit WordPress plugins dynamically using jS?
- Attempting to list all product categories and the price range of all products within them
- WP Import All Multiple Dynamic Link Imports
- admin_notices show after load completed
- WordPress + python integration
- Newbie problem with adding include wp_footer
- Plugin which unlock free gift when you reach some amount in cart
- is there a way to display product gallery images via cdn
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- How can I create a secure file download in WordPress?
- How can I see $post object in frontend from functions.php?
- Move plugin pages from dashboard to front-end
- Get post content inside plugin class method
- Ajax call to php function doesn’t work PHP code
- Python in WordPress – A “Hello World” implementation
- Compare Ajax Data Results
- WordPress PHP error getting posts from another wordpress blog
- Restrict role to use a plugin
- Creating new option (add_option) from AJAX – Settings API
- Use WP_Query for custom post type but result get empty
- Same Title on two different post type with single custom taxonomy
- Every time I use wp_get_current_user() my plugin breaks
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Need help integrating plugin into theme
- resizes images on the fly
- AJAX doesn’t pass variables to the php function in the plugin
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- Load my plugin before cache
- My wordpress site wont load, it gives header error warnings
- Can anyone see a syntax error in this? [closed]
- Strict Standards: Non-static method in sidebar generator
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- wp_handle_upload – specified file failed upload test
- Warning: Undefined variable $admin
- How to make a Template page to show the information of different things Shop and Product page?
- Split Million WordPress Post’s Into Multiple Database Server
- public custom posts not showing in my wordpress plugin
- I want to allow certain file types on dokan upload files