<?php $string = "2017 MODEL YEAR 6.7L POWER STROKE V8 DIESEL 6-SPEED AUTO TRANS 3.55 ELECTRONIC LOCKING AXLE FX4 OFF-ROAD PACKAGE .SKID PLATES 10000-lb. GVWR PACKAGE"; Preg_match("/(\d+)(\d{3})-lb/", $string, $match); $find = $match[0]; $replace = $match[1] .",". $match[2] ."-lb"; Echo str_replace($find, $replace, $string);
You have javascript disabled. You will not be able to edit any code.